···44 "defs": {
55 "main": {
66 "type": "object",
77+ "description": "A simplified theme definition for publications, providing basic color customization for content display across different platforms and applications.",
78 "required": [
89 "background",
910 "foreground",
···1314 "properties": {
1415 "accent": {
1516 "type": "union",
1717+ "description": "Color used for links and button backgrounds.",
1618 "refs": [
1719 "site.standard.theme.color#rgb"
1820 ]
1921 },
2022 "accentForeground": {
2123 "type": "union",
2424+ "description": "Color used for button text.",
2225 "refs": [
2326 "site.standard.theme.color#rgb"
2427 ]
2528 },
2629 "background": {
2730 "type": "union",
3131+ "description": "Color used for content background.",
2832 "refs": [
2933 "site.standard.theme.color#rgb"
3034 ]
3135 },
3236 "foreground": {
3337 "type": "union",
3838+ "description": "Color used for content text.",
3439 "refs": [
3540 "site.standard.theme.color#rgb"
3641 ]
+106-106
crates/weaver-api/src/app_bsky/actor.rs
···36273627 }
36283628 /// State trait tracking which required fields have been set
36293629 pub trait State: sealed::Sealed {
36303630- type Targets;
36313630 type Value;
36313631+ type Targets;
36323632 }
36333633 /// Empty state - all required fields are unset
36343634 pub struct Empty(());
36353635 impl sealed::Sealed for Empty {}
36363636 impl State for Empty {
36373637- type Targets = Unset;
36383637 type Value = Unset;
36393639- }
36403640- ///State transition - sets the `targets` field to Set
36413641- pub struct SetTargets<S: State = Empty>(PhantomData<fn() -> S>);
36423642- impl<S: State> sealed::Sealed for SetTargets<S> {}
36433643- impl<S: State> State for SetTargets<S> {
36443644- type Targets = Set<members::targets>;
36453645- type Value = S::Value;
36383638+ type Targets = Unset;
36463639 }
36473640 ///State transition - sets the `value` field to Set
36483641 pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
36493642 impl<S: State> sealed::Sealed for SetValue<S> {}
36503643 impl<S: State> State for SetValue<S> {
36513651- type Targets = S::Targets;
36523644 type Value = Set<members::value>;
36453645+ type Targets = S::Targets;
36463646+ }
36473647+ ///State transition - sets the `targets` field to Set
36483648+ pub struct SetTargets<S: State = Empty>(PhantomData<fn() -> S>);
36493649+ impl<S: State> sealed::Sealed for SetTargets<S> {}
36503650+ impl<S: State> State for SetTargets<S> {
36513651+ type Value = S::Value;
36523652+ type Targets = Set<members::targets>;
36533653 }
36543654 /// Marker types for field names
36553655 #[allow(non_camel_case_types)]
36563656 pub mod members {
36573657- ///Marker type for the `targets` field
36583658- pub struct targets(());
36593657 ///Marker type for the `value` field
36603658 pub struct value(());
36593659+ ///Marker type for the `targets` field
36603660+ pub struct targets(());
36613661 }
36623662}
36633663···37843784impl<'a, S> MutedWordBuilder<'a, S>
37853785where
37863786 S: muted_word_state::State,
37873787- S::Targets: muted_word_state::IsSet,
37883787 S::Value: muted_word_state::IsSet,
37883788+ S::Targets: muted_word_state::IsSet,
37893789{
37903790 /// Build the final struct
37913791 pub fn build(self) -> MutedWord<'a> {
···50075007 }
50085008 /// State trait tracking which required fields have been set
50095009 pub trait State: sealed::Sealed {
50105010- type Handle;
50115010 type Did;
50115011+ type Handle;
50125012 }
50135013 /// Empty state - all required fields are unset
50145014 pub struct Empty(());
50155015 impl sealed::Sealed for Empty {}
50165016 impl State for Empty {
50175017- type Handle = Unset;
50185017 type Did = Unset;
50195019- }
50205020- ///State transition - sets the `handle` field to Set
50215021- pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
50225022- impl<S: State> sealed::Sealed for SetHandle<S> {}
50235023- impl<S: State> State for SetHandle<S> {
50245024- type Handle = Set<members::handle>;
50255025- type Did = S::Did;
50185018+ type Handle = Unset;
50265019 }
50275020 ///State transition - sets the `did` field to Set
50285021 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
50295022 impl<S: State> sealed::Sealed for SetDid<S> {}
50305023 impl<S: State> State for SetDid<S> {
50315031- type Handle = S::Handle;
50325024 type Did = Set<members::did>;
50255025+ type Handle = S::Handle;
50265026+ }
50275027+ ///State transition - sets the `handle` field to Set
50285028+ pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
50295029+ impl<S: State> sealed::Sealed for SetHandle<S> {}
50305030+ impl<S: State> State for SetHandle<S> {
50315031+ type Did = S::Did;
50325032+ type Handle = Set<members::handle>;
50335033 }
50345034 /// Marker types for field names
50355035 #[allow(non_camel_case_types)]
50365036 pub mod members {
50375037- ///Marker type for the `handle` field
50385038- pub struct handle(());
50395037 ///Marker type for the `did` field
50405038 pub struct did(());
50395039+ ///Marker type for the `handle` field
50405040+ pub struct handle(());
50415041 }
50425042}
50435043···53625362impl<'a, S> ProfileViewBuilder<'a, S>
53635363where
53645364 S: profile_view_state::State,
53655365- S::Handle: profile_view_state::IsSet,
53665365 S::Did: profile_view_state::IsSet,
53665366+ S::Handle: profile_view_state::IsSet,
53675367{
53685368 /// Build the final struct
53695369 pub fn build(self) -> ProfileView<'a> {
···60406040 }
60416041 /// State trait tracking which required fields have been set
60426042 pub trait State: sealed::Sealed {
60436043- type Did;
60446043 type Handle;
60446044+ type Did;
60456045 }
60466046 /// Empty state - all required fields are unset
60476047 pub struct Empty(());
60486048 impl sealed::Sealed for Empty {}
60496049 impl State for Empty {
60506050- type Did = Unset;
60516050 type Handle = Unset;
60516051+ type Did = Unset;
60526052+ }
60536053+ ///State transition - sets the `handle` field to Set
60546054+ pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
60556055+ impl<S: State> sealed::Sealed for SetHandle<S> {}
60566056+ impl<S: State> State for SetHandle<S> {
60576057+ type Handle = Set<members::handle>;
60586058+ type Did = S::Did;
60526059 }
60536060 ///State transition - sets the `did` field to Set
60546061 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
60556062 impl<S: State> sealed::Sealed for SetDid<S> {}
60566063 impl<S: State> State for SetDid<S> {
60576057- type Did = Set<members::did>;
60586064 type Handle = S::Handle;
60596059- }
60606060- ///State transition - sets the `handle` field to Set
60616061- pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
60626062- impl<S: State> sealed::Sealed for SetHandle<S> {}
60636063- impl<S: State> State for SetHandle<S> {
60646064- type Did = S::Did;
60656065- type Handle = Set<members::handle>;
60656065+ type Did = Set<members::did>;
60666066 }
60676067 /// Marker types for field names
60686068 #[allow(non_camel_case_types)]
60696069 pub mod members {
60706070+ ///Marker type for the `handle` field
60716071+ pub struct handle(());
60706072 ///Marker type for the `did` field
60716073 pub struct did(());
60726072- ///Marker type for the `handle` field
60736073- pub struct handle(());
60746074 }
60756075}
60766076···65246524impl<'a, S> ProfileViewDetailedBuilder<'a, S>
65256525where
65266526 S: profile_view_detailed_state::State,
65276527- S::Did: profile_view_detailed_state::IsSet,
65286527 S::Handle: profile_view_detailed_state::IsSet,
65286528+ S::Did: profile_view_detailed_state::IsSet,
65296529{
65306530 /// Build the final struct
65316531 pub fn build(self) -> ProfileViewDetailed<'a> {
···66976697 }
66986698 /// State trait tracking which required fields have been set
66996699 pub trait State: sealed::Sealed {
67006700- type Type;
67016701- type Pinned;
67026702- type Id;
67036700 type Value;
67016701+ type Id;
67026702+ type Pinned;
67036703+ type Type;
67046704 }
67056705 /// Empty state - all required fields are unset
67066706 pub struct Empty(());
67076707 impl sealed::Sealed for Empty {}
67086708 impl State for Empty {
67096709- type Type = Unset;
67106710- type Pinned = Unset;
67096709+ type Value = Unset;
67116710 type Id = Unset;
67126712- type Value = Unset;
67116711+ type Pinned = Unset;
67126712+ type Type = Unset;
67136713 }
67146714- ///State transition - sets the `type` field to Set
67156715- pub struct SetType<S: State = Empty>(PhantomData<fn() -> S>);
67166716- impl<S: State> sealed::Sealed for SetType<S> {}
67176717- impl<S: State> State for SetType<S> {
67186718- type Type = Set<members::r#type>;
67196719- type Pinned = S::Pinned;
67146714+ ///State transition - sets the `value` field to Set
67156715+ pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
67166716+ impl<S: State> sealed::Sealed for SetValue<S> {}
67176717+ impl<S: State> State for SetValue<S> {
67186718+ type Value = Set<members::value>;
67206719 type Id = S::Id;
67216721- type Value = S::Value;
67226722- }
67236723- ///State transition - sets the `pinned` field to Set
67246724- pub struct SetPinned<S: State = Empty>(PhantomData<fn() -> S>);
67256725- impl<S: State> sealed::Sealed for SetPinned<S> {}
67266726- impl<S: State> State for SetPinned<S> {
67206720+ type Pinned = S::Pinned;
67276721 type Type = S::Type;
67286728- type Pinned = Set<members::pinned>;
67296729- type Id = S::Id;
67306730- type Value = S::Value;
67316722 }
67326723 ///State transition - sets the `id` field to Set
67336724 pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
67346725 impl<S: State> sealed::Sealed for SetId<S> {}
67356726 impl<S: State> State for SetId<S> {
67276727+ type Value = S::Value;
67286728+ type Id = Set<members::id>;
67296729+ type Pinned = S::Pinned;
67366730 type Type = S::Type;
67376737- type Pinned = S::Pinned;
67386738- type Id = Set<members::id>;
67396739- type Value = S::Value;
67406731 }
67416741- ///State transition - sets the `value` field to Set
67426742- pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
67436743- impl<S: State> sealed::Sealed for SetValue<S> {}
67446744- impl<S: State> State for SetValue<S> {
67326732+ ///State transition - sets the `pinned` field to Set
67336733+ pub struct SetPinned<S: State = Empty>(PhantomData<fn() -> S>);
67346734+ impl<S: State> sealed::Sealed for SetPinned<S> {}
67356735+ impl<S: State> State for SetPinned<S> {
67366736+ type Value = S::Value;
67376737+ type Id = S::Id;
67386738+ type Pinned = Set<members::pinned>;
67456739 type Type = S::Type;
67466746- type Pinned = S::Pinned;
67406740+ }
67416741+ ///State transition - sets the `type` field to Set
67426742+ pub struct SetType<S: State = Empty>(PhantomData<fn() -> S>);
67436743+ impl<S: State> sealed::Sealed for SetType<S> {}
67446744+ impl<S: State> State for SetType<S> {
67456745+ type Value = S::Value;
67476746 type Id = S::Id;
67486748- type Value = Set<members::value>;
67476747+ type Pinned = S::Pinned;
67486748+ type Type = Set<members::r#type>;
67496749 }
67506750 /// Marker types for field names
67516751 #[allow(non_camel_case_types)]
67526752 pub mod members {
67536753- ///Marker type for the `type` field
67546754- pub struct r#type(());
67536753+ ///Marker type for the `value` field
67546754+ pub struct value(());
67556755+ ///Marker type for the `id` field
67566756+ pub struct id(());
67556757 ///Marker type for the `pinned` field
67566758 pub struct pinned(());
67576757- ///Marker type for the `id` field
67586758- pub struct id(());
67596759- ///Marker type for the `value` field
67606760- pub struct value(());
67596759+ ///Marker type for the `type` field
67606760+ pub struct r#type(());
67616761 }
67626762}
67636763···68706870impl<'a, S> SavedFeedBuilder<'a, S>
68716871where
68726872 S: saved_feed_state::State,
68736873- S::Type: saved_feed_state::IsSet,
68746874- S::Pinned: saved_feed_state::IsSet,
68756875- S::Id: saved_feed_state::IsSet,
68766873 S::Value: saved_feed_state::IsSet,
68746874+ S::Id: saved_feed_state::IsSet,
68756875+ S::Pinned: saved_feed_state::IsSet,
68766876+ S::Type: saved_feed_state::IsSet,
68776877{
68786878 /// Build the final struct
68796879 pub fn build(self) -> SavedFeed<'a> {
···73837383 }
73847384 /// State trait tracking which required fields have been set
73857385 pub trait State: sealed::Sealed {
73867386- type Record;
73877386 type Status;
73877387+ type Record;
73887388 }
73897389 /// Empty state - all required fields are unset
73907390 pub struct Empty(());
73917391 impl sealed::Sealed for Empty {}
73927392 impl State for Empty {
73937393- type Record = Unset;
73947393 type Status = Unset;
73947394+ type Record = Unset;
73957395+ }
73967396+ ///State transition - sets the `status` field to Set
73977397+ pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
73987398+ impl<S: State> sealed::Sealed for SetStatus<S> {}
73997399+ impl<S: State> State for SetStatus<S> {
74007400+ type Status = Set<members::status>;
74017401+ type Record = S::Record;
73957402 }
73967403 ///State transition - sets the `record` field to Set
73977404 pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
73987405 impl<S: State> sealed::Sealed for SetRecord<S> {}
73997406 impl<S: State> State for SetRecord<S> {
74077407+ type Status = S::Status;
74007408 type Record = Set<members::record>;
74017401- type Status = S::Status;
74027402- }
74037403- ///State transition - sets the `status` field to Set
74047404- pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
74057405- impl<S: State> sealed::Sealed for SetStatus<S> {}
74067406- impl<S: State> State for SetStatus<S> {
74077407- type Record = S::Record;
74087408- type Status = Set<members::status>;
74097409 }
74107410 /// Marker types for field names
74117411 #[allow(non_camel_case_types)]
74127412 pub mod members {
74137413+ ///Marker type for the `status` field
74147414+ pub struct status(());
74137415 ///Marker type for the `record` field
74147416 pub struct record(());
74157415- ///Marker type for the `status` field
74167416- pub struct status(());
74177417 }
74187418}
74197419···75407540impl<'a, S> StatusViewBuilder<'a, S>
75417541where
75427542 S: status_view_state::State,
75437543- S::Record: status_view_state::IsSet,
75447543 S::Status: status_view_state::IsSet,
75447544+ S::Record: status_view_state::IsSet,
75457545{
75467546 /// Build the final struct
75477547 pub fn build(self) -> StatusView<'a> {
···78847884 }
78857885 /// State trait tracking which required fields have been set
78867886 pub trait State: sealed::Sealed {
78877887+ type VerifiedStatus;
78877888 type Verifications;
78887889 type TrustedVerifierStatus;
78897889- type VerifiedStatus;
78907890 }
78917891 /// Empty state - all required fields are unset
78927892 pub struct Empty(());
78937893 impl sealed::Sealed for Empty {}
78947894 impl State for Empty {
78957895+ type VerifiedStatus = Unset;
78957896 type Verifications = Unset;
78967897 type TrustedVerifierStatus = Unset;
78977897- type VerifiedStatus = Unset;
78987898+ }
78997899+ ///State transition - sets the `verified_status` field to Set
79007900+ pub struct SetVerifiedStatus<S: State = Empty>(PhantomData<fn() -> S>);
79017901+ impl<S: State> sealed::Sealed for SetVerifiedStatus<S> {}
79027902+ impl<S: State> State for SetVerifiedStatus<S> {
79037903+ type VerifiedStatus = Set<members::verified_status>;
79047904+ type Verifications = S::Verifications;
79057905+ type TrustedVerifierStatus = S::TrustedVerifierStatus;
78987906 }
78997907 ///State transition - sets the `verifications` field to Set
79007908 pub struct SetVerifications<S: State = Empty>(PhantomData<fn() -> S>);
79017909 impl<S: State> sealed::Sealed for SetVerifications<S> {}
79027910 impl<S: State> State for SetVerifications<S> {
79117911+ type VerifiedStatus = S::VerifiedStatus;
79037912 type Verifications = Set<members::verifications>;
79047913 type TrustedVerifierStatus = S::TrustedVerifierStatus;
79057905- type VerifiedStatus = S::VerifiedStatus;
79067914 }
79077915 ///State transition - sets the `trusted_verifier_status` field to Set
79087916 pub struct SetTrustedVerifierStatus<S: State = Empty>(PhantomData<fn() -> S>);
79097917 impl<S: State> sealed::Sealed for SetTrustedVerifierStatus<S> {}
79107918 impl<S: State> State for SetTrustedVerifierStatus<S> {
79117911- type Verifications = S::Verifications;
79127912- type TrustedVerifierStatus = Set<members::trusted_verifier_status>;
79137919 type VerifiedStatus = S::VerifiedStatus;
79147914- }
79157915- ///State transition - sets the `verified_status` field to Set
79167916- pub struct SetVerifiedStatus<S: State = Empty>(PhantomData<fn() -> S>);
79177917- impl<S: State> sealed::Sealed for SetVerifiedStatus<S> {}
79187918- impl<S: State> State for SetVerifiedStatus<S> {
79197920 type Verifications = S::Verifications;
79207920- type TrustedVerifierStatus = S::TrustedVerifierStatus;
79217921- type VerifiedStatus = Set<members::verified_status>;
79217921+ type TrustedVerifierStatus = Set<members::trusted_verifier_status>;
79227922 }
79237923 /// Marker types for field names
79247924 #[allow(non_camel_case_types)]
79257925 pub mod members {
79267926+ ///Marker type for the `verified_status` field
79277927+ pub struct verified_status(());
79267928 ///Marker type for the `verifications` field
79277929 pub struct verifications(());
79287930 ///Marker type for the `trusted_verifier_status` field
79297931 pub struct trusted_verifier_status(());
79307930- ///Marker type for the `verified_status` field
79317931- pub struct verified_status(());
79327932 }
79337933}
79347934···80248024impl<'a, S> VerificationStateBuilder<'a, S>
80258025where
80268026 S: verification_state_state::State,
80278027+ S::VerifiedStatus: verification_state_state::IsSet,
80278028 S::Verifications: verification_state_state::IsSet,
80288029 S::TrustedVerifierStatus: verification_state_state::IsSet,
80298029- S::VerifiedStatus: verification_state_state::IsSet,
80308030{
80318031 /// Build the final struct
80328032 pub fn build(self) -> VerificationState<'a> {
+84-84
crates/weaver-api/src/app_bsky/ageassurance.rs
···20882088 }
20892089 /// State trait tracking which required fields have been set
20902090 pub trait State: sealed::Sealed {
20912091- type Age;
20922091 type Access;
20922092+ type Age;
20932093 }
20942094 /// Empty state - all required fields are unset
20952095 pub struct Empty(());
20962096 impl sealed::Sealed for Empty {}
20972097 impl State for Empty {
20982098- type Age = Unset;
20992098 type Access = Unset;
21002100- }
21012101- ///State transition - sets the `age` field to Set
21022102- pub struct SetAge<S: State = Empty>(PhantomData<fn() -> S>);
21032103- impl<S: State> sealed::Sealed for SetAge<S> {}
21042104- impl<S: State> State for SetAge<S> {
21052105- type Age = Set<members::age>;
21062106- type Access = S::Access;
20992099+ type Age = Unset;
21072100 }
21082101 ///State transition - sets the `access` field to Set
21092102 pub struct SetAccess<S: State = Empty>(PhantomData<fn() -> S>);
21102103 impl<S: State> sealed::Sealed for SetAccess<S> {}
21112104 impl<S: State> State for SetAccess<S> {
21122112- type Age = S::Age;
21132105 type Access = Set<members::access>;
21062106+ type Age = S::Age;
21072107+ }
21082108+ ///State transition - sets the `age` field to Set
21092109+ pub struct SetAge<S: State = Empty>(PhantomData<fn() -> S>);
21102110+ impl<S: State> sealed::Sealed for SetAge<S> {}
21112111+ impl<S: State> State for SetAge<S> {
21122112+ type Access = S::Access;
21132113+ type Age = Set<members::age>;
21142114 }
21152115 /// Marker types for field names
21162116 #[allow(non_camel_case_types)]
21172117 pub mod members {
21182118- ///Marker type for the `age` field
21192119- pub struct age(());
21202118 ///Marker type for the `access` field
21212119 pub struct access(());
21202120+ ///Marker type for the `age` field
21212121+ pub struct age(());
21222122 }
21232123}
21242124···22082208impl<'a, S> ConfigRegionRuleIfAssuredUnderAgeBuilder<'a, S>
22092209where
22102210 S: config_region_rule_if_assured_under_age_state::State,
22112211- S::Age: config_region_rule_if_assured_under_age_state::IsSet,
22122211 S::Access: config_region_rule_if_assured_under_age_state::IsSet,
22122212+ S::Age: config_region_rule_if_assured_under_age_state::IsSet,
22132213{
22142214 /// Build the final struct
22152215 pub fn build(self) -> ConfigRegionRuleIfAssuredUnderAge<'a> {
···24762476 }
24772477 /// State trait tracking which required fields have been set
24782478 pub trait State: sealed::Sealed {
24792479- type Age;
24802479 type Access;
24802480+ type Age;
24812481 }
24822482 /// Empty state - all required fields are unset
24832483 pub struct Empty(());
24842484 impl sealed::Sealed for Empty {}
24852485 impl State for Empty {
24862486- type Age = Unset;
24872486 type Access = Unset;
24882488- }
24892489- ///State transition - sets the `age` field to Set
24902490- pub struct SetAge<S: State = Empty>(PhantomData<fn() -> S>);
24912491- impl<S: State> sealed::Sealed for SetAge<S> {}
24922492- impl<S: State> State for SetAge<S> {
24932493- type Age = Set<members::age>;
24942494- type Access = S::Access;
24872487+ type Age = Unset;
24952488 }
24962489 ///State transition - sets the `access` field to Set
24972490 pub struct SetAccess<S: State = Empty>(PhantomData<fn() -> S>);
24982491 impl<S: State> sealed::Sealed for SetAccess<S> {}
24992492 impl<S: State> State for SetAccess<S> {
25002500- type Age = S::Age;
25012493 type Access = Set<members::access>;
24942494+ type Age = S::Age;
24952495+ }
24962496+ ///State transition - sets the `age` field to Set
24972497+ pub struct SetAge<S: State = Empty>(PhantomData<fn() -> S>);
24982498+ impl<S: State> sealed::Sealed for SetAge<S> {}
24992499+ impl<S: State> State for SetAge<S> {
25002500+ type Access = S::Access;
25012501+ type Age = Set<members::age>;
25022502 }
25032503 /// Marker types for field names
25042504 #[allow(non_camel_case_types)]
25052505 pub mod members {
25062506+ ///Marker type for the `access` field
25072507+ pub struct access(());
25062508 ///Marker type for the `age` field
25072509 pub struct age(());
25082508- ///Marker type for the `access` field
25092509- pub struct access(());
25102510 }
25112511}
25122512···25962596impl<'a, S> ConfigRegionRuleIfDeclaredUnderAgeBuilder<'a, S>
25972597where
25982598 S: config_region_rule_if_declared_under_age_state::State,
25992599- S::Age: config_region_rule_if_declared_under_age_state::IsSet,
26002599 S::Access: config_region_rule_if_declared_under_age_state::IsSet,
26002600+ S::Age: config_region_rule_if_declared_under_age_state::IsSet,
26012601{
26022602 /// Build the final struct
26032603 pub fn build(self) -> ConfigRegionRuleIfDeclaredUnderAge<'a> {
···27042704 }
27052705 /// State trait tracking which required fields have been set
27062706 pub trait State: sealed::Sealed {
27072707+ type CountryCode;
27082708+ type AttemptId;
27092709+ type Access;
27072710 type CreatedAt;
27082708- type Access;
27092711 type Status;
27102710- type AttemptId;
27112711- type CountryCode;
27122712 }
27132713 /// Empty state - all required fields are unset
27142714 pub struct Empty(());
27152715 impl sealed::Sealed for Empty {}
27162716 impl State for Empty {
27172717+ type CountryCode = Unset;
27182718+ type AttemptId = Unset;
27192719+ type Access = Unset;
27172720 type CreatedAt = Unset;
27182718- type Access = Unset;
27192721 type Status = Unset;
27202720- type AttemptId = Unset;
27212721- type CountryCode = Unset;
27222722 }
27232723- ///State transition - sets the `created_at` field to Set
27242724- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
27252725- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
27262726- impl<S: State> State for SetCreatedAt<S> {
27272727- type CreatedAt = Set<members::created_at>;
27232723+ ///State transition - sets the `country_code` field to Set
27242724+ pub struct SetCountryCode<S: State = Empty>(PhantomData<fn() -> S>);
27252725+ impl<S: State> sealed::Sealed for SetCountryCode<S> {}
27262726+ impl<S: State> State for SetCountryCode<S> {
27272727+ type CountryCode = Set<members::country_code>;
27282728+ type AttemptId = S::AttemptId;
27282729 type Access = S::Access;
27302730+ type CreatedAt = S::CreatedAt;
27292731 type Status = S::Status;
27302730- type AttemptId = S::AttemptId;
27322732+ }
27332733+ ///State transition - sets the `attempt_id` field to Set
27342734+ pub struct SetAttemptId<S: State = Empty>(PhantomData<fn() -> S>);
27352735+ impl<S: State> sealed::Sealed for SetAttemptId<S> {}
27362736+ impl<S: State> State for SetAttemptId<S> {
27312737 type CountryCode = S::CountryCode;
27382738+ type AttemptId = Set<members::attempt_id>;
27392739+ type Access = S::Access;
27402740+ type CreatedAt = S::CreatedAt;
27412741+ type Status = S::Status;
27322742 }
27332743 ///State transition - sets the `access` field to Set
27342744 pub struct SetAccess<S: State = Empty>(PhantomData<fn() -> S>);
27352745 impl<S: State> sealed::Sealed for SetAccess<S> {}
27362746 impl<S: State> State for SetAccess<S> {
27372737- type CreatedAt = S::CreatedAt;
27472747+ type CountryCode = S::CountryCode;
27482748+ type AttemptId = S::AttemptId;
27382749 type Access = Set<members::access>;
27502750+ type CreatedAt = S::CreatedAt;
27392751 type Status = S::Status;
27522752+ }
27532753+ ///State transition - sets the `created_at` field to Set
27542754+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
27552755+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
27562756+ impl<S: State> State for SetCreatedAt<S> {
27572757+ type CountryCode = S::CountryCode;
27402758 type AttemptId = S::AttemptId;
27412741- type CountryCode = S::CountryCode;
27592759+ type Access = S::Access;
27602760+ type CreatedAt = Set<members::created_at>;
27612761+ type Status = S::Status;
27422762 }
27432763 ///State transition - sets the `status` field to Set
27442764 pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
27452765 impl<S: State> sealed::Sealed for SetStatus<S> {}
27462766 impl<S: State> State for SetStatus<S> {
27472747- type CreatedAt = S::CreatedAt;
27482748- type Access = S::Access;
27492749- type Status = Set<members::status>;
27502750- type AttemptId = S::AttemptId;
27512767 type CountryCode = S::CountryCode;
27522752- }
27532753- ///State transition - sets the `attempt_id` field to Set
27542754- pub struct SetAttemptId<S: State = Empty>(PhantomData<fn() -> S>);
27552755- impl<S: State> sealed::Sealed for SetAttemptId<S> {}
27562756- impl<S: State> State for SetAttemptId<S> {
27572757- type CreatedAt = S::CreatedAt;
27682768+ type AttemptId = S::AttemptId;
27582769 type Access = S::Access;
27592759- type Status = S::Status;
27602760- type AttemptId = Set<members::attempt_id>;
27612761- type CountryCode = S::CountryCode;
27622762- }
27632763- ///State transition - sets the `country_code` field to Set
27642764- pub struct SetCountryCode<S: State = Empty>(PhantomData<fn() -> S>);
27652765- impl<S: State> sealed::Sealed for SetCountryCode<S> {}
27662766- impl<S: State> State for SetCountryCode<S> {
27672770 type CreatedAt = S::CreatedAt;
27682768- type Access = S::Access;
27692769- type Status = S::Status;
27702770- type AttemptId = S::AttemptId;
27712771- type CountryCode = Set<members::country_code>;
27712771+ type Status = Set<members::status>;
27722772 }
27732773 /// Marker types for field names
27742774 #[allow(non_camel_case_types)]
27752775 pub mod members {
27762776- ///Marker type for the `created_at` field
27772777- pub struct created_at(());
27762776+ ///Marker type for the `country_code` field
27772777+ pub struct country_code(());
27782778+ ///Marker type for the `attempt_id` field
27792779+ pub struct attempt_id(());
27782780 ///Marker type for the `access` field
27792781 pub struct access(());
27822782+ ///Marker type for the `created_at` field
27832783+ pub struct created_at(());
27802784 ///Marker type for the `status` field
27812785 pub struct status(());
27822782- ///Marker type for the `attempt_id` field
27832783- pub struct attempt_id(());
27842784- ///Marker type for the `country_code` field
27852785- pub struct country_code(());
27862786 }
27872787}
27882788···30383038impl<'a, S> EventBuilder<'a, S>
30393039where
30403040 S: event_state::State,
30413041- S::CreatedAt: event_state::IsSet,
30413041+ S::CountryCode: event_state::IsSet,
30423042+ S::AttemptId: event_state::IsSet,
30423043 S::Access: event_state::IsSet,
30443044+ S::CreatedAt: event_state::IsSet,
30433045 S::Status: event_state::IsSet,
30443044- S::AttemptId: event_state::IsSet,
30453045- S::CountryCode: event_state::IsSet,
30463046{
30473047 /// Build the final struct
30483048 pub fn build(self) -> Event<'a> {
···33333333 }
33343334 /// State trait tracking which required fields have been set
33353335 pub trait State: sealed::Sealed {
33363336- type Status;
33373336 type Access;
33373337+ type Status;
33383338 }
33393339 /// Empty state - all required fields are unset
33403340 pub struct Empty(());
33413341 impl sealed::Sealed for Empty {}
33423342 impl State for Empty {
33433343- type Status = Unset;
33443343 type Access = Unset;
33453345- }
33463346- ///State transition - sets the `status` field to Set
33473347- pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
33483348- impl<S: State> sealed::Sealed for SetStatus<S> {}
33493349- impl<S: State> State for SetStatus<S> {
33503350- type Status = Set<members::status>;
33513351- type Access = S::Access;
33443344+ type Status = Unset;
33523345 }
33533346 ///State transition - sets the `access` field to Set
33543347 pub struct SetAccess<S: State = Empty>(PhantomData<fn() -> S>);
33553348 impl<S: State> sealed::Sealed for SetAccess<S> {}
33563349 impl<S: State> State for SetAccess<S> {
33503350+ type Access = Set<members::access>;
33573351 type Status = S::Status;
33583358- type Access = Set<members::access>;
33523352+ }
33533353+ ///State transition - sets the `status` field to Set
33543354+ pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
33553355+ impl<S: State> sealed::Sealed for SetStatus<S> {}
33563356+ impl<S: State> State for SetStatus<S> {
33573357+ type Access = S::Access;
33583358+ type Status = Set<members::status>;
33593359 }
33603360 /// Marker types for field names
33613361 #[allow(non_camel_case_types)]
33623362 pub mod members {
33633363+ ///Marker type for the `access` field
33643364+ pub struct access(());
33633365 ///Marker type for the `status` field
33643366 pub struct status(());
33653365- ///Marker type for the `access` field
33663366- pub struct access(());
33673367 }
33683368}
33693369···34563456impl<'a, S> StateBuilder<'a, S>
34573457where
34583458 S: state_state::State,
34593459- S::Status: state_state::IsSet,
34603459 S::Access: state_state::IsSet,
34603460+ S::Status: state_state::IsSet,
34613461{
34623462 /// Build the final struct
34633463 pub fn build(self) -> State<'a> {
+13-13
crates/weaver-api/src/app_bsky/bookmark.rs
···281281 }
282282 /// State trait tracking which required fields have been set
283283 pub trait State: sealed::Sealed {
284284- type Item;
285284 type Subject;
285285+ type Item;
286286 }
287287 /// Empty state - all required fields are unset
288288 pub struct Empty(());
289289 impl sealed::Sealed for Empty {}
290290 impl State for Empty {
291291- type Item = Unset;
292291 type Subject = Unset;
293293- }
294294- ///State transition - sets the `item` field to Set
295295- pub struct SetItem<S: State = Empty>(PhantomData<fn() -> S>);
296296- impl<S: State> sealed::Sealed for SetItem<S> {}
297297- impl<S: State> State for SetItem<S> {
298298- type Item = Set<members::item>;
299299- type Subject = S::Subject;
292292+ type Item = Unset;
300293 }
301294 ///State transition - sets the `subject` field to Set
302295 pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
303296 impl<S: State> sealed::Sealed for SetSubject<S> {}
304297 impl<S: State> State for SetSubject<S> {
305305- type Item = S::Item;
306298 type Subject = Set<members::subject>;
299299+ type Item = S::Item;
300300+ }
301301+ ///State transition - sets the `item` field to Set
302302+ pub struct SetItem<S: State = Empty>(PhantomData<fn() -> S>);
303303+ impl<S: State> sealed::Sealed for SetItem<S> {}
304304+ impl<S: State> State for SetItem<S> {
305305+ type Subject = S::Subject;
306306+ type Item = Set<members::item>;
307307 }
308308 /// Marker types for field names
309309 #[allow(non_camel_case_types)]
310310 pub mod members {
311311- ///Marker type for the `item` field
312312- pub struct item(());
313311 ///Marker type for the `subject` field
314312 pub struct subject(());
313313+ ///Marker type for the `item` field
314314+ pub struct item(());
315315 }
316316}
317317···404404impl<'a, S> BookmarkViewBuilder<'a, S>
405405where
406406 S: bookmark_view_state::State,
407407- S::Item: bookmark_view_state::IsSet,
408407 S::Subject: bookmark_view_state::IsSet,
408408+ S::Item: bookmark_view_state::IsSet,
409409{
410410 /// Build the final struct
411411 pub fn build(self) -> BookmarkView<'a> {
···3333 }
3434 /// State trait tracking which required fields have been set
3535 pub trait State: sealed::Sealed {
3636- type Uri;
3736 type Cid;
3737+ type Uri;
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 Uri = Unset;
4443 type Cid = Unset;
4545- }
4646- ///State transition - sets the `uri` field to Set
4747- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
4848- impl<S: State> sealed::Sealed for SetUri<S> {}
4949- impl<S: State> State for SetUri<S> {
5050- type Uri = Set<members::uri>;
5151- type Cid = S::Cid;
4444+ type Uri = Unset;
5245 }
5346 ///State transition - sets the `cid` field to Set
5447 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
5548 impl<S: State> sealed::Sealed for SetCid<S> {}
5649 impl<S: State> State for SetCid<S> {
5757- type Uri = S::Uri;
5850 type Cid = Set<members::cid>;
5151+ type Uri = S::Uri;
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 Cid = S::Cid;
5858+ type Uri = Set<members::uri>;
5959 }
6060 /// Marker types for field names
6161 #[allow(non_camel_case_types)]
6262 pub mod members {
6363- ///Marker type for the `uri` field
6464- pub struct uri(());
6563 ///Marker type for the `cid` field
6664 pub struct cid(());
6565+ ///Marker type for the `uri` field
6666+ pub struct uri(());
6767 }
6868}
6969···136136impl<'a, S> CreateBookmarkBuilder<'a, S>
137137where
138138 S: create_bookmark_state::State,
139139- S::Uri: create_bookmark_state::IsSet,
140139 S::Cid: create_bookmark_state::IsSet,
140140+ S::Uri: create_bookmark_state::IsSet,
141141{
142142 /// Build the final struct
143143 pub fn build(self) -> CreateBookmark<'a> {
+30-30
crates/weaver-api/src/app_bsky/embed/external.rs
···3939 /// State trait tracking which required fields have been set
4040 pub trait State: sealed::Sealed {
4141 type Title;
4242- type Description;
4342 type Uri;
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 Title = Unset;
5050- type Description = Unset;
5150 type Uri = Unset;
5151+ type Description = Unset;
5252 }
5353 ///State transition - sets the `title` field to Set
5454 pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
5555 impl<S: State> sealed::Sealed for SetTitle<S> {}
5656 impl<S: State> State for SetTitle<S> {
5757 type Title = Set<members::title>;
5858- type Description = S::Description;
5958 type Uri = S::Uri;
6060- }
6161- ///State transition - sets the `description` field to Set
6262- pub struct SetDescription<S: State = Empty>(PhantomData<fn() -> S>);
6363- impl<S: State> sealed::Sealed for SetDescription<S> {}
6464- impl<S: State> State for SetDescription<S> {
6565- type Title = S::Title;
6666- type Description = Set<members::description>;
6767- type Uri = S::Uri;
5959+ type Description = S::Description;
6860 }
6961 ///State transition - sets the `uri` field to Set
7062 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
7163 impl<S: State> sealed::Sealed for SetUri<S> {}
7264 impl<S: State> State for SetUri<S> {
7365 type Title = S::Title;
7474- type Description = S::Description;
7566 type Uri = Set<members::uri>;
6767+ 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> {
7373+ type Title = S::Title;
7474+ type Uri = S::Uri;
7575+ type Description = Set<members::description>;
7676 }
7777 /// Marker types for field names
7878 #[allow(non_camel_case_types)]
7979 pub mod members {
8080 ///Marker type for the `title` field
8181 pub struct title(());
8282+ ///Marker type for the `uri` field
8383+ pub struct uri(());
8284 ///Marker type for the `description` field
8385 pub struct description(());
8484- ///Marker type for the `uri` field
8585- pub struct uri(());
8686 }
8787}
8888···196196where
197197 S: external_state::State,
198198 S::Title: external_state::IsSet,
199199- S::Description: external_state::IsSet,
200199 S::Uri: external_state::IsSet,
200200+ S::Description: external_state::IsSet,
201201{
202202 /// Build the final struct
203203 pub fn build(self) -> External<'a> {
···784784 }
785785 /// State trait tracking which required fields have been set
786786 pub trait State: sealed::Sealed {
787787- type Title;
788787 type Uri;
788788+ type Title;
789789 type Description;
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 Title = Unset;
796795 type Uri = Unset;
796796+ type Title = Unset;
797797 type Description = Unset;
798798 }
799799- ///State transition - sets the `title` field to Set
800800- pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
801801- impl<S: State> sealed::Sealed for SetTitle<S> {}
802802- impl<S: State> State for SetTitle<S> {
803803- type Title = Set<members::title>;
804804- type Uri = S::Uri;
805805- type Description = S::Description;
806806- }
807799 ///State transition - sets the `uri` field to Set
808800 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
809801 impl<S: State> sealed::Sealed for SetUri<S> {}
810802 impl<S: State> State for SetUri<S> {
811811- type Title = S::Title;
812803 type Uri = Set<members::uri>;
804804+ type Title = S::Title;
805805+ 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;
814814 }
815815 ///State transition - sets the `description` field to Set
816816 pub struct SetDescription<S: State = Empty>(PhantomData<fn() -> S>);
817817 impl<S: State> sealed::Sealed for SetDescription<S> {}
818818 impl<S: State> State for SetDescription<S> {
819819- type Title = S::Title;
820819 type Uri = S::Uri;
820820+ type Title = S::Title;
821821 type Description = Set<members::description>;
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(());
826828 ///Marker type for the `title` field
827829 pub struct title(());
828828- ///Marker type for the `uri` field
829829- pub struct uri(());
830830 ///Marker type for the `description` field
831831 pub struct description(());
832832 }
···941941impl<'a, S> ViewExternalBuilder<'a, S>
942942where
943943 S: view_external_state::State,
944944- S::Title: view_external_state::IsSet,
945944 S::Uri: view_external_state::IsSet,
945945+ S::Title: view_external_state::IsSet,
946946 S::Description: view_external_state::IsSet,
947947{
948948 /// Build the final struct
+28-28
crates/weaver-api/src/app_bsky/embed/images.rs
···3737 }
3838 /// State trait tracking which required fields have been set
3939 pub trait State: sealed::Sealed {
4040- type Image;
4140 type Alt;
4141+ type Image;
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 Image = Unset;
4847 type Alt = Unset;
4949- }
5050- ///State transition - sets the `image` field to Set
5151- pub struct SetImage<S: State = Empty>(PhantomData<fn() -> S>);
5252- impl<S: State> sealed::Sealed for SetImage<S> {}
5353- impl<S: State> State for SetImage<S> {
5454- type Image = Set<members::image>;
5555- type Alt = S::Alt;
4848+ type Image = Unset;
5649 }
5750 ///State transition - sets the `alt` field to Set
5851 pub struct SetAlt<S: State = Empty>(PhantomData<fn() -> S>);
5952 impl<S: State> sealed::Sealed for SetAlt<S> {}
6053 impl<S: State> State for SetAlt<S> {
6161- type Image = S::Image;
6254 type Alt = Set<members::alt>;
5555+ type Image = S::Image;
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 Alt = S::Alt;
6262+ type Image = Set<members::image>;
6363 }
6464 /// Marker types for field names
6565 #[allow(non_camel_case_types)]
6666 pub mod members {
6767- ///Marker type for the `image` field
6868- pub struct image(());
6967 ///Marker type for the `alt` field
7068 pub struct alt(());
6969+ ///Marker type for the `image` field
7070+ pub struct image(());
7171 }
7272}
7373···160160impl<'a, S> ImageBuilder<'a, S>
161161where
162162 S: image_state::State,
163163- S::Image: image_state::IsSet,
164163 S::Alt: image_state::IsSet,
164164+ S::Image: image_state::IsSet,
165165{
166166 /// Build the final struct
167167 pub fn build(self) -> Image<'a> {
···760760 }
761761 /// State trait tracking which required fields have been set
762762 pub trait State: sealed::Sealed {
763763+ type Thumb;
763764 type Fullsize;
764765 type Alt;
765765- type Thumb;
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 Thumb = Unset;
771772 type Fullsize = Unset;
772773 type Alt = Unset;
773773- type Thumb = Unset;
774774+ }
775775+ ///State transition - sets the `thumb` field to Set
776776+ pub struct SetThumb<S: State = Empty>(PhantomData<fn() -> S>);
777777+ impl<S: State> sealed::Sealed for SetThumb<S> {}
778778+ impl<S: State> State for SetThumb<S> {
779779+ type Thumb = Set<members::thumb>;
780780+ type Fullsize = S::Fullsize;
781781+ type Alt = S::Alt;
774782 }
775783 ///State transition - sets the `fullsize` field to Set
776784 pub struct SetFullsize<S: State = Empty>(PhantomData<fn() -> S>);
777785 impl<S: State> sealed::Sealed for SetFullsize<S> {}
778786 impl<S: State> State for SetFullsize<S> {
787787+ type Thumb = S::Thumb;
779788 type Fullsize = Set<members::fullsize>;
780789 type Alt = S::Alt;
781781- type Thumb = S::Thumb;
782790 }
783791 ///State transition - sets the `alt` field to Set
784792 pub struct SetAlt<S: State = Empty>(PhantomData<fn() -> S>);
785793 impl<S: State> sealed::Sealed for SetAlt<S> {}
786794 impl<S: State> State for SetAlt<S> {
787787- type Fullsize = S::Fullsize;
788788- type Alt = Set<members::alt>;
789795 type Thumb = S::Thumb;
790790- }
791791- ///State transition - sets the `thumb` field to Set
792792- pub struct SetThumb<S: State = Empty>(PhantomData<fn() -> S>);
793793- impl<S: State> sealed::Sealed for SetThumb<S> {}
794794- impl<S: State> State for SetThumb<S> {
795796 type Fullsize = S::Fullsize;
796796- type Alt = S::Alt;
797797- type Thumb = Set<members::thumb>;
797797+ type Alt = Set<members::alt>;
798798 }
799799 /// Marker types for field names
800800 #[allow(non_camel_case_types)]
801801 pub mod members {
802802+ ///Marker type for the `thumb` field
803803+ pub struct thumb(());
802804 ///Marker type for the `fullsize` field
803805 pub struct fullsize(());
804806 ///Marker type for the `alt` field
805807 pub struct alt(());
806806- ///Marker type for the `thumb` field
807807- pub struct thumb(());
808808 }
809809}
810810···917917impl<'a, S> ViewImageBuilder<'a, S>
918918where
919919 S: view_image_state::State,
920920+ S::Thumb: view_image_state::IsSet,
920921 S::Fullsize: view_image_state::IsSet,
921922 S::Alt: view_image_state::IsSet,
922922- S::Thumb: view_image_state::IsSet,
923923{
924924 /// Build the final struct
925925 pub fn build(self) -> ViewImage<'a> {
+84-84
crates/weaver-api/src/app_bsky/embed/record.rs
···723723 }
724724 /// State trait tracking which required fields have been set
725725 pub trait State: sealed::Sealed {
726726+ type Author;
726727 type Uri;
727728 type Blocked;
728728- type Author;
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 Author = Unset;
734735 type Uri = Unset;
735736 type Blocked = Unset;
736736- type Author = Unset;
737737+ }
738738+ ///State transition - sets the `author` field to Set
739739+ pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
740740+ impl<S: State> sealed::Sealed for SetAuthor<S> {}
741741+ impl<S: State> State for SetAuthor<S> {
742742+ type Author = Set<members::author>;
743743+ type Uri = S::Uri;
744744+ type Blocked = S::Blocked;
737745 }
738746 ///State transition - sets the `uri` field to Set
739747 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
740748 impl<S: State> sealed::Sealed for SetUri<S> {}
741749 impl<S: State> State for SetUri<S> {
750750+ type Author = S::Author;
742751 type Uri = Set<members::uri>;
743752 type Blocked = S::Blocked;
744744- type Author = S::Author;
745753 }
746754 ///State transition - sets the `blocked` field to Set
747755 pub struct SetBlocked<S: State = Empty>(PhantomData<fn() -> S>);
748756 impl<S: State> sealed::Sealed for SetBlocked<S> {}
749757 impl<S: State> State for SetBlocked<S> {
750750- type Uri = S::Uri;
751751- type Blocked = Set<members::blocked>;
752758 type Author = S::Author;
753753- }
754754- ///State transition - sets the `author` field to Set
755755- pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
756756- impl<S: State> sealed::Sealed for SetAuthor<S> {}
757757- impl<S: State> State for SetAuthor<S> {
758759 type Uri = S::Uri;
759759- type Blocked = S::Blocked;
760760- type Author = Set<members::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 `author` field
766766+ pub struct author(());
765767 ///Marker type for the `uri` field
766768 pub struct uri(());
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···860860impl<'a, S> ViewBlockedBuilder<'a, S>
861861where
862862 S: view_blocked_state::State,
863863+ S::Author: view_blocked_state::IsSet,
863864 S::Uri: view_blocked_state::IsSet,
864865 S::Blocked: view_blocked_state::IsSet,
865865- S::Author: view_blocked_state::IsSet,
866866{
867867 /// Build the final struct
868868 pub fn build(self) -> ViewBlocked<'a> {
···934934 }
935935 /// State trait tracking which required fields have been set
936936 pub trait State: sealed::Sealed {
937937- type Detached;
938937 type Uri;
938938+ type Detached;
939939 }
940940 /// Empty state - all required fields are unset
941941 pub struct Empty(());
942942 impl sealed::Sealed for Empty {}
943943 impl State for Empty {
944944- type Detached = Unset;
945944 type Uri = Unset;
946946- }
947947- ///State transition - sets the `detached` field to Set
948948- pub struct SetDetached<S: State = Empty>(PhantomData<fn() -> S>);
949949- impl<S: State> sealed::Sealed for SetDetached<S> {}
950950- impl<S: State> State for SetDetached<S> {
951951- type Detached = Set<members::detached>;
952952- type Uri = S::Uri;
945945+ type Detached = Unset;
953946 }
954947 ///State transition - sets the `uri` field to Set
955948 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
956949 impl<S: State> sealed::Sealed for SetUri<S> {}
957950 impl<S: State> State for SetUri<S> {
958958- type Detached = S::Detached;
959951 type Uri = Set<members::uri>;
952952+ type Detached = S::Detached;
953953+ }
954954+ ///State transition - sets the `detached` field to Set
955955+ pub struct SetDetached<S: State = Empty>(PhantomData<fn() -> S>);
956956+ impl<S: State> sealed::Sealed for SetDetached<S> {}
957957+ impl<S: State> State for SetDetached<S> {
958958+ type Uri = S::Uri;
959959+ type Detached = Set<members::detached>;
960960 }
961961 /// Marker types for field names
962962 #[allow(non_camel_case_types)]
963963 pub mod members {
964964+ ///Marker type for the `uri` field
965965+ pub struct uri(());
964966 ///Marker type for the `detached` field
965967 pub struct detached(());
966966- ///Marker type for the `uri` field
967967- pub struct uri(());
968968 }
969969}
970970···10371037impl<'a, S> ViewDetachedBuilder<'a, S>
10381038where
10391039 S: view_detached_state::State,
10401040- S::Detached: view_detached_state::IsSet,
10411040 S::Uri: view_detached_state::IsSet,
10411041+ S::Detached: view_detached_state::IsSet,
10421042{
10431043 /// Build the final struct
10441044 pub fn build(self) -> ViewDetached<'a> {
···11081108 }
11091109 /// State trait tracking which required fields have been set
11101110 pub trait State: sealed::Sealed {
11111111- type NotFound;
11121111 type Uri;
11121112+ type NotFound;
11131113 }
11141114 /// Empty state - all required fields are unset
11151115 pub struct Empty(());
11161116 impl sealed::Sealed for Empty {}
11171117 impl State for Empty {
11181118- type NotFound = Unset;
11191118 type Uri = Unset;
11201120- }
11211121- ///State transition - sets the `not_found` field to Set
11221122- pub struct SetNotFound<S: State = Empty>(PhantomData<fn() -> S>);
11231123- impl<S: State> sealed::Sealed for SetNotFound<S> {}
11241124- impl<S: State> State for SetNotFound<S> {
11251125- type NotFound = Set<members::not_found>;
11261126- type Uri = S::Uri;
11191119+ type NotFound = Unset;
11271120 }
11281121 ///State transition - sets the `uri` field to Set
11291122 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
11301123 impl<S: State> sealed::Sealed for SetUri<S> {}
11311124 impl<S: State> State for SetUri<S> {
11251125+ type Uri = Set<members::uri>;
11321126 type NotFound = S::NotFound;
11331133- type Uri = Set<members::uri>;
11271127+ }
11281128+ ///State transition - sets the `not_found` field to Set
11291129+ pub struct SetNotFound<S: State = Empty>(PhantomData<fn() -> S>);
11301130+ impl<S: State> sealed::Sealed for SetNotFound<S> {}
11311131+ impl<S: State> State for SetNotFound<S> {
11321132+ type Uri = S::Uri;
11331133+ type NotFound = Set<members::not_found>;
11341134 }
11351135 /// Marker types for field names
11361136 #[allow(non_camel_case_types)]
11371137 pub mod members {
11381138- ///Marker type for the `not_found` field
11391139- pub struct not_found(());
11401138 ///Marker type for the `uri` field
11411139 pub struct uri(());
11401140+ ///Marker type for the `not_found` field
11411141+ pub struct not_found(());
11421142 }
11431143}
11441144···12111211impl<'a, S> ViewNotFoundBuilder<'a, S>
12121212where
12131213 S: view_not_found_state::State,
12141214- S::NotFound: view_not_found_state::IsSet,
12151214 S::Uri: view_not_found_state::IsSet,
12151215+ S::NotFound: view_not_found_state::IsSet,
12161216{
12171217 /// Build the final struct
12181218 pub fn build(self) -> ViewNotFound<'a> {
···13031303 }
13041304 /// State trait tracking which required fields have been set
13051305 pub trait State: sealed::Sealed {
13061306- type Cid;
13061306+ type Uri;
13071307 type Author;
13081308- type Value;
13091308 type IndexedAt;
13101310- type Uri;
13091309+ type Cid;
13101310+ type Value;
13111311 }
13121312 /// Empty state - all required fields are unset
13131313 pub struct Empty(());
13141314 impl sealed::Sealed for Empty {}
13151315 impl State for Empty {
13161316- type Cid = Unset;
13161316+ type Uri = Unset;
13171317 type Author = Unset;
13181318+ type IndexedAt = Unset;
13191319+ type Cid = Unset;
13181320 type Value = Unset;
13191319- type IndexedAt = Unset;
13201320- type Uri = Unset;
13211321 }
13221322- ///State transition - sets the `cid` field to Set
13231323- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
13241324- impl<S: State> sealed::Sealed for SetCid<S> {}
13251325- impl<S: State> State for SetCid<S> {
13261326- type Cid = Set<members::cid>;
13221322+ ///State transition - sets the `uri` field to Set
13231323+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
13241324+ impl<S: State> sealed::Sealed for SetUri<S> {}
13251325+ impl<S: State> State for SetUri<S> {
13261326+ type Uri = Set<members::uri>;
13271327 type Author = S::Author;
13281328- type Value = S::Value;
13291328 type IndexedAt = S::IndexedAt;
13301330- type Uri = S::Uri;
13291329+ type Cid = S::Cid;
13301330+ type Value = S::Value;
13311331 }
13321332 ///State transition - sets the `author` field to Set
13331333 pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
13341334 impl<S: State> sealed::Sealed for SetAuthor<S> {}
13351335 impl<S: State> State for SetAuthor<S> {
13361336- type Cid = S::Cid;
13361336+ type Uri = S::Uri;
13371337 type Author = Set<members::author>;
13381338- type Value = S::Value;
13391338 type IndexedAt = S::IndexedAt;
13401340- type Uri = S::Uri;
13411341- }
13421342- ///State transition - sets the `value` field to Set
13431343- pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
13441344- impl<S: State> sealed::Sealed for SetValue<S> {}
13451345- impl<S: State> State for SetValue<S> {
13461339 type Cid = S::Cid;
13471347- type Author = S::Author;
13481348- type Value = Set<members::value>;
13491349- type IndexedAt = S::IndexedAt;
13501350- type Uri = S::Uri;
13401340+ type Value = S::Value;
13511341 }
13521342 ///State transition - sets the `indexed_at` field to Set
13531343 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
13541344 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
13551345 impl<S: State> State for SetIndexedAt<S> {
13561356- type Cid = S::Cid;
13461346+ type Uri = S::Uri;
13571347 type Author = S::Author;
13481348+ type IndexedAt = Set<members::indexed_at>;
13491349+ type Cid = S::Cid;
13581350 type Value = S::Value;
13591359- type IndexedAt = Set<members::indexed_at>;
13511351+ }
13521352+ ///State transition - sets the `cid` field to Set
13531353+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
13541354+ impl<S: State> sealed::Sealed for SetCid<S> {}
13551355+ impl<S: State> State for SetCid<S> {
13601356 type Uri = S::Uri;
13571357+ type Author = S::Author;
13581358+ type IndexedAt = S::IndexedAt;
13591359+ type Cid = Set<members::cid>;
13601360+ type Value = S::Value;
13611361 }
13621362- ///State transition - sets the `uri` field to Set
13631363- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
13641364- impl<S: State> sealed::Sealed for SetUri<S> {}
13651365- impl<S: State> State for SetUri<S> {
13661366- type Cid = S::Cid;
13621362+ ///State transition - sets the `value` field to Set
13631363+ pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
13641364+ impl<S: State> sealed::Sealed for SetValue<S> {}
13651365+ impl<S: State> State for SetValue<S> {
13661366+ type Uri = S::Uri;
13671367 type Author = S::Author;
13681368- type Value = S::Value;
13691368 type IndexedAt = S::IndexedAt;
13701370- type Uri = Set<members::uri>;
13691369+ type Cid = S::Cid;
13701370+ type Value = Set<members::value>;
13711371 }
13721372 /// Marker types for field names
13731373 #[allow(non_camel_case_types)]
13741374 pub mod members {
13751375+ ///Marker type for the `uri` field
13761376+ pub struct uri(());
13771377+ ///Marker type for the `author` field
13781378+ pub struct author(());
13791379+ ///Marker type for the `indexed_at` field
13801380+ pub struct indexed_at(());
13751381 ///Marker type for the `cid` field
13761382 pub struct cid(());
13771377- ///Marker type for the `author` field
13781378- pub struct author(());
13791383 ///Marker type for the `value` field
13801384 pub struct value(());
13811381- ///Marker type for the `indexed_at` field
13821382- pub struct indexed_at(());
13831383- ///Marker type for the `uri` field
13841384- pub struct uri(());
13851385 }
13861386}
13871387···16191619impl<'a, S> ViewRecordBuilder<'a, S>
16201620where
16211621 S: view_record_state::State,
16221622- S::Cid: view_record_state::IsSet,
16221622+ S::Uri: view_record_state::IsSet,
16231623 S::Author: view_record_state::IsSet,
16241624- S::Value: view_record_state::IsSet,
16251624 S::IndexedAt: view_record_state::IsSet,
16261626- S::Uri: view_record_state::IsSet,
16251625+ S::Cid: view_record_state::IsSet,
16261626+ S::Value: view_record_state::IsSet,
16271627{
16281628 /// Build the final struct
16291629 pub fn build(self) -> ViewRecord<'a> {
···322322 }
323323 /// State trait tracking which required fields have been set
324324 pub trait State: sealed::Sealed {
325325- type Record;
326325 type Media;
326326+ type Record;
327327 }
328328 /// Empty state - all required fields are unset
329329 pub struct Empty(());
330330 impl sealed::Sealed for Empty {}
331331 impl State for Empty {
332332- type Record = Unset;
333332 type Media = Unset;
334334- }
335335- ///State transition - sets the `record` field to Set
336336- pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
337337- impl<S: State> sealed::Sealed for SetRecord<S> {}
338338- impl<S: State> State for SetRecord<S> {
339339- type Record = Set<members::record>;
340340- type Media = S::Media;
333333+ type Record = Unset;
341334 }
342335 ///State transition - sets the `media` field to Set
343336 pub struct SetMedia<S: State = Empty>(PhantomData<fn() -> S>);
344337 impl<S: State> sealed::Sealed for SetMedia<S> {}
345338 impl<S: State> State for SetMedia<S> {
346346- type Record = S::Record;
347339 type Media = Set<members::media>;
340340+ type Record = S::Record;
341341+ }
342342+ ///State transition - sets the `record` field to Set
343343+ pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
344344+ impl<S: State> sealed::Sealed for SetRecord<S> {}
345345+ impl<S: State> State for SetRecord<S> {
346346+ type Media = S::Media;
347347+ type Record = Set<members::record>;
348348 }
349349 /// Marker types for field names
350350 #[allow(non_camel_case_types)]
351351 pub mod members {
352352- ///Marker type for the `record` field
353353- pub struct record(());
354352 ///Marker type for the `media` field
355353 pub struct media(());
354354+ ///Marker type for the `record` field
355355+ pub struct record(());
356356 }
357357}
358358···425425impl<'a, S> ViewBuilder<'a, S>
426426where
427427 S: view_state::State,
428428- S::Record: view_state::IsSet,
429428 S::Media: view_state::IsSet,
429429+ S::Record: view_state::IsSet,
430430{
431431 /// Build the final struct
432432 pub fn build(self) -> View<'a> {
+13-13
crates/weaver-api/src/app_bsky/embed/video.rs
···687687 }
688688 /// State trait tracking which required fields have been set
689689 pub trait State: sealed::Sealed {
690690- type Playlist;
691690 type Cid;
691691+ type Playlist;
692692 }
693693 /// Empty state - all required fields are unset
694694 pub struct Empty(());
695695 impl sealed::Sealed for Empty {}
696696 impl State for Empty {
697697- type Playlist = Unset;
698697 type Cid = Unset;
699699- }
700700- ///State transition - sets the `playlist` field to Set
701701- pub struct SetPlaylist<S: State = Empty>(PhantomData<fn() -> S>);
702702- impl<S: State> sealed::Sealed for SetPlaylist<S> {}
703703- impl<S: State> State for SetPlaylist<S> {
704704- type Playlist = Set<members::playlist>;
705705- type Cid = S::Cid;
698698+ type Playlist = Unset;
706699 }
707700 ///State transition - sets the `cid` field to Set
708701 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
709702 impl<S: State> sealed::Sealed for SetCid<S> {}
710703 impl<S: State> State for SetCid<S> {
711711- type Playlist = S::Playlist;
712704 type Cid = Set<members::cid>;
705705+ type Playlist = S::Playlist;
706706+ }
707707+ ///State transition - sets the `playlist` field to Set
708708+ pub struct SetPlaylist<S: State = Empty>(PhantomData<fn() -> S>);
709709+ impl<S: State> sealed::Sealed for SetPlaylist<S> {}
710710+ impl<S: State> State for SetPlaylist<S> {
711711+ type Cid = S::Cid;
712712+ type Playlist = Set<members::playlist>;
713713 }
714714 /// Marker types for field names
715715 #[allow(non_camel_case_types)]
716716 pub mod members {
717717- ///Marker type for the `playlist` field
718718- pub struct playlist(());
719717 ///Marker type for the `cid` field
720718 pub struct cid(());
719719+ ///Marker type for the `playlist` field
720720+ pub struct playlist(());
721721 }
722722}
723723···844844impl<'a, S> ViewBuilder<'a, S>
845845where
846846 S: view_state::State,
847847- S::Playlist: view_state::IsSet,
848847 S::Cid: view_state::IsSet,
848848+ S::Playlist: view_state::IsSet,
849849{
850850 /// Build the final struct
851851 pub fn build(self) -> View<'a> {
+109-109
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;
16131612 type Blocked;
16141613 type Uri;
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;
16211620 type Blocked = Unset;
16221621 type Uri = 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 Blocked = S::Blocked;
16301630- type Uri = S::Uri;
16221622+ type Author = Unset;
16311623 }
16321624 ///State transition - sets the `blocked` field to Set
16331625 pub struct SetBlocked<S: State = Empty>(PhantomData<fn() -> S>);
16341626 impl<S: State> sealed::Sealed for SetBlocked<S> {}
16351627 impl<S: State> State for SetBlocked<S> {
16361636- type Author = S::Author;
16371628 type Blocked = Set<members::blocked>;
16381629 type Uri = S::Uri;
16301630+ type Author = S::Author;
16391631 }
16401632 ///State transition - sets the `uri` field to Set
16411633 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
16421634 impl<S: State> sealed::Sealed for SetUri<S> {}
16431635 impl<S: State> State for SetUri<S> {
16441644- type Author = S::Author;
16451636 type Blocked = S::Blocked;
16461637 type Uri = Set<members::uri>;
16381638+ 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> {
16441644+ type Blocked = S::Blocked;
16451645+ type Uri = S::Uri;
16461646+ type Author = Set<members::author>;
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(());
16531651 ///Marker type for the `blocked` field
16541652 pub struct blocked(());
16551653 ///Marker type for the `uri` field
16561654 pub struct uri(());
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,
17501749 S::Blocked: blocked_post_state::IsSet,
17511750 S::Uri: blocked_post_state::IsSet,
17511751+ S::Author: blocked_post_state::IsSet,
17521752{
17531753 /// Build the final struct
17541754 pub fn build(self) -> BlockedPost<'a> {
···22342234 }
22352235 /// State trait tracking which required fields have been set
22362236 pub trait State: sealed::Sealed {
22372237- type Uri;
22372237+ type Creator;
22382238+ type DisplayName;
22382239 type Cid;
22392240 type Did;
22402241 type IndexedAt;
22412241- type Creator;
22422242- type DisplayName;
22422242+ type Uri;
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;
22482248+ type Creator = Unset;
22492249+ type DisplayName = Unset;
22492250 type Cid = Unset;
22502251 type Did = Unset;
22512252 type IndexedAt = Unset;
22522252- type Creator = Unset;
22532253- type DisplayName = Unset;
22532253+ type Uri = 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>;
22552255+ ///State transition - sets the `creator` field to Set
22562256+ pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
22572257+ impl<S: State> sealed::Sealed for SetCreator<S> {}
22582258+ impl<S: State> State for SetCreator<S> {
22592259+ type Creator = Set<members::creator>;
22602260+ type DisplayName = S::DisplayName;
22602261 type Cid = S::Cid;
22612262 type Did = S::Did;
22622263 type IndexedAt = S::IndexedAt;
22642264+ type Uri = S::Uri;
22652265+ }
22662266+ ///State transition - sets the `display_name` field to Set
22672267+ pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>);
22682268+ impl<S: State> sealed::Sealed for SetDisplayName<S> {}
22692269+ impl<S: State> State for SetDisplayName<S> {
22632270 type Creator = S::Creator;
22642264- type DisplayName = S::DisplayName;
22712271+ type DisplayName = Set<members::display_name>;
22722272+ type Cid = S::Cid;
22732273+ type Did = S::Did;
22742274+ type IndexedAt = S::IndexedAt;
22752275+ type Uri = S::Uri;
22652276 }
22662277 ///State transition - sets the `cid` field to Set
22672278 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
22682279 impl<S: State> sealed::Sealed for SetCid<S> {}
22692280 impl<S: State> State for SetCid<S> {
22702270- type Uri = S::Uri;
22812281+ type Creator = S::Creator;
22822282+ type DisplayName = S::DisplayName;
22712283 type Cid = Set<members::cid>;
22722284 type Did = S::Did;
22732285 type IndexedAt = S::IndexedAt;
22742274- type Creator = S::Creator;
22752275- type DisplayName = S::DisplayName;
22862286+ type Uri = S::Uri;
22762287 }
22772288 ///State transition - sets the `did` field to Set
22782289 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
22792290 impl<S: State> sealed::Sealed for SetDid<S> {}
22802291 impl<S: State> State for SetDid<S> {
22812281- type Uri = S::Uri;
22922292+ type Creator = S::Creator;
22932293+ type DisplayName = S::DisplayName;
22822294 type Cid = S::Cid;
22832295 type Did = Set<members::did>;
22842296 type IndexedAt = S::IndexedAt;
22852285- type Creator = S::Creator;
22862286- type DisplayName = S::DisplayName;
22972297+ type Uri = S::Uri;
22872298 }
22882299 ///State transition - sets the `indexed_at` field to Set
22892300 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
22902301 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
22912302 impl<S: State> State for SetIndexedAt<S> {
22922292- type Uri = S::Uri;
23032303+ type Creator = S::Creator;
23042304+ type DisplayName = S::DisplayName;
22932305 type Cid = S::Cid;
22942306 type Did = S::Did;
22952307 type IndexedAt = Set<members::indexed_at>;
23082308+ type Uri = S::Uri;
23092309+ }
23102310+ ///State transition - sets the `uri` field to Set
23112311+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
23122312+ impl<S: State> sealed::Sealed for SetUri<S> {}
23132313+ impl<S: State> State for SetUri<S> {
22962314 type Creator = S::Creator;
22972315 type DisplayName = S::DisplayName;
22982298- }
22992299- ///State transition - sets the `creator` field to Set
23002300- pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
23012301- impl<S: State> sealed::Sealed for SetCreator<S> {}
23022302- impl<S: State> State for SetCreator<S> {
23032303- type Uri = S::Uri;
23042316 type Cid = S::Cid;
23052317 type Did = S::Did;
23062318 type IndexedAt = S::IndexedAt;
23072307- type Creator = Set<members::creator>;
23082308- type DisplayName = S::DisplayName;
23092309- }
23102310- ///State transition - sets the `display_name` field to Set
23112311- pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>);
23122312- impl<S: State> sealed::Sealed for SetDisplayName<S> {}
23132313- impl<S: State> State for SetDisplayName<S> {
23142314- type Uri = S::Uri;
23152315- type Cid = S::Cid;
23162316- type Did = S::Did;
23172317- type IndexedAt = S::IndexedAt;
23182318- type Creator = S::Creator;
23192319- type DisplayName = Set<members::display_name>;
23192319+ type Uri = Set<members::uri>;
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(());
23242324+ ///Marker type for the `creator` field
23252325+ pub struct creator(());
23262326+ ///Marker type for the `display_name` field
23272327+ pub struct display_name(());
23262328 ///Marker type for the `cid` field
23272329 pub struct cid(());
23282330 ///Marker type for the `did` field
23292331 pub struct did(());
23302332 ///Marker type for the `indexed_at` field
23312333 pub struct indexed_at(());
23322332- ///Marker type for the `creator` field
23332333- pub struct creator(());
23342334- ///Marker type for the `display_name` field
23352335- pub struct display_name(());
23342334+ ///Marker type for the `uri` field
23352335+ pub struct uri(());
23362336 }
23372337}
23382338···26482648impl<'a, S> GeneratorViewBuilder<'a, S>
26492649where
26502650 S: generator_view_state::State,
26512651- S::Uri: generator_view_state::IsSet,
26512651+ S::Creator: generator_view_state::IsSet,
26522652+ S::DisplayName: generator_view_state::IsSet,
26522653 S::Cid: generator_view_state::IsSet,
26532654 S::Did: generator_view_state::IsSet,
26542655 S::IndexedAt: generator_view_state::IsSet,
26552655- S::Creator: generator_view_state::IsSet,
26562656- S::DisplayName: generator_view_state::IsSet,
26562656+ S::Uri: generator_view_state::IsSet,
26572657{
26582658 /// Build the final struct
26592659 pub fn build(self) -> GeneratorView<'a> {
···32353235 }
32363236 /// State trait tracking which required fields have been set
32373237 pub trait State: sealed::Sealed {
32383238- type NotFound;
32393238 type Uri;
32393239+ type NotFound;
32403240 }
32413241 /// Empty state - all required fields are unset
32423242 pub struct Empty(());
32433243 impl sealed::Sealed for Empty {}
32443244 impl State for Empty {
32453245- type NotFound = Unset;
32463245 type Uri = Unset;
32473247- }
32483248- ///State transition - sets the `not_found` field to Set
32493249- pub struct SetNotFound<S: State = Empty>(PhantomData<fn() -> S>);
32503250- impl<S: State> sealed::Sealed for SetNotFound<S> {}
32513251- impl<S: State> State for SetNotFound<S> {
32523252- type NotFound = Set<members::not_found>;
32533253- type Uri = S::Uri;
32463246+ type NotFound = Unset;
32543247 }
32553248 ///State transition - sets the `uri` field to Set
32563249 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
32573250 impl<S: State> sealed::Sealed for SetUri<S> {}
32583251 impl<S: State> State for SetUri<S> {
32593259- type NotFound = S::NotFound;
32603252 type Uri = Set<members::uri>;
32533253+ type NotFound = S::NotFound;
32543254+ }
32553255+ ///State transition - sets the `not_found` field to Set
32563256+ pub struct SetNotFound<S: State = Empty>(PhantomData<fn() -> S>);
32573257+ impl<S: State> sealed::Sealed for SetNotFound<S> {}
32583258+ impl<S: State> State for SetNotFound<S> {
32593259+ type Uri = S::Uri;
32603260+ type NotFound = Set<members::not_found>;
32613261 }
32623262 /// Marker types for field names
32633263 #[allow(non_camel_case_types)]
32643264 pub mod members {
32653265+ ///Marker type for the `uri` field
32663266+ pub struct uri(());
32653267 ///Marker type for the `not_found` field
32663268 pub struct not_found(());
32673267- ///Marker type for the `uri` field
32683268- pub struct uri(());
32693269 }
32703270}
32713271···33383338impl<'a, S> NotFoundPostBuilder<'a, S>
33393339where
33403340 S: not_found_post_state::State,
33413341- S::NotFound: not_found_post_state::IsSet,
33423341 S::Uri: not_found_post_state::IsSet,
33423342+ S::NotFound: not_found_post_state::IsSet,
33433343{
33443344 /// Build the final struct
33453345 pub fn build(self) -> NotFoundPost<'a> {
···34423442 /// State trait tracking which required fields have been set
34433443 pub trait State: sealed::Sealed {
34443444 type Record;
34453445+ type Cid;
34463446+ type Uri;
34453447 type Author;
34463448 type IndexedAt;
34473447- type Cid;
34483448- type Uri;
34493449 }
34503450 /// Empty state - all required fields are unset
34513451 pub struct Empty(());
34523452 impl sealed::Sealed for Empty {}
34533453 impl State for Empty {
34543454 type Record = Unset;
34553455+ type Cid = Unset;
34563456+ type Uri = Unset;
34553457 type Author = Unset;
34563458 type IndexedAt = Unset;
34573457- type Cid = Unset;
34583458- type Uri = Unset;
34593459 }
34603460 ///State transition - sets the `record` field to Set
34613461 pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
34623462 impl<S: State> sealed::Sealed for SetRecord<S> {}
34633463 impl<S: State> State for SetRecord<S> {
34643464 type Record = Set<members::record>;
34653465+ type Cid = S::Cid;
34663466+ type Uri = S::Uri;
34653467 type Author = S::Author;
34663468 type IndexedAt = S::IndexedAt;
34693469+ }
34703470+ ///State transition - sets the `cid` field to Set
34713471+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
34723472+ impl<S: State> sealed::Sealed for SetCid<S> {}
34733473+ impl<S: State> State for SetCid<S> {
34743474+ type Record = S::Record;
34753475+ type Cid = Set<members::cid>;
34763476+ type Uri = S::Uri;
34773477+ type Author = S::Author;
34783478+ type IndexedAt = S::IndexedAt;
34793479+ }
34803480+ ///State transition - sets the `uri` field to Set
34813481+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
34823482+ impl<S: State> sealed::Sealed for SetUri<S> {}
34833483+ impl<S: State> State for SetUri<S> {
34843484+ type Record = S::Record;
34673485 type Cid = S::Cid;
34683468- type Uri = S::Uri;
34863486+ type Uri = Set<members::uri>;
34873487+ type Author = S::Author;
34883488+ type IndexedAt = S::IndexedAt;
34693489 }
34703490 ///State transition - sets the `author` field to Set
34713491 pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
34723492 impl<S: State> sealed::Sealed for SetAuthor<S> {}
34733493 impl<S: State> State for SetAuthor<S> {
34743494 type Record = S::Record;
34753475- type Author = Set<members::author>;
34763476- type IndexedAt = S::IndexedAt;
34773495 type Cid = S::Cid;
34783496 type Uri = S::Uri;
34973497+ type Author = Set<members::author>;
34983498+ type IndexedAt = S::IndexedAt;
34793499 }
34803500 ///State transition - sets the `indexed_at` field to Set
34813501 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
34823502 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
34833503 impl<S: State> State for SetIndexedAt<S> {
34843504 type Record = S::Record;
34853485- type Author = S::Author;
34863486- type IndexedAt = Set<members::indexed_at>;
34873505 type Cid = S::Cid;
34883506 type Uri = S::Uri;
34893489- }
34903490- ///State transition - sets the `cid` field to Set
34913491- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
34923492- impl<S: State> sealed::Sealed for SetCid<S> {}
34933493- impl<S: State> State for SetCid<S> {
34943494- type Record = S::Record;
34953507 type Author = S::Author;
34963496- type IndexedAt = S::IndexedAt;
34973497- type Cid = Set<members::cid>;
34983498- type Uri = S::Uri;
34993499- }
35003500- ///State transition - sets the `uri` field to Set
35013501- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
35023502- impl<S: State> sealed::Sealed for SetUri<S> {}
35033503- impl<S: State> State for SetUri<S> {
35043504- type Record = S::Record;
35053505- type Author = S::Author;
35063506- type IndexedAt = S::IndexedAt;
35073507- type Cid = S::Cid;
35083508- type Uri = Set<members::uri>;
35083508+ type IndexedAt = Set<members::indexed_at>;
35093509 }
35103510 /// Marker types for field names
35113511 #[allow(non_camel_case_types)]
35123512 pub mod members {
35133513 ///Marker type for the `record` field
35143514 pub struct record(());
35153515- ///Marker type for the `author` field
35163516- pub struct author(());
35173517- ///Marker type for the `indexed_at` field
35183518- pub struct indexed_at(());
35193515 ///Marker type for the `cid` field
35203516 pub struct cid(());
35213517 ///Marker type for the `uri` field
35223518 pub struct uri(());
35193519+ ///Marker type for the `author` field
35203520+ pub struct author(());
35213521+ ///Marker type for the `indexed_at` field
35223522+ pub struct indexed_at(());
35233523 }
35243524}
35253525···38333833where
38343834 S: post_view_state::State,
38353835 S::Record: post_view_state::IsSet,
38363836+ S::Cid: post_view_state::IsSet,
38373837+ S::Uri: post_view_state::IsSet,
38363838 S::Author: post_view_state::IsSet,
38373839 S::IndexedAt: post_view_state::IsSet,
38383838- S::Cid: post_view_state::IsSet,
38393839- S::Uri: post_view_state::IsSet,
38403840{
38413841 /// Build the final struct
38423842 pub fn build(self) -> PostView<'a> {
+15-15
crates/weaver-api/src/app_bsky/feed/generator.rs
···5757 /// State trait tracking which required fields have been set
5858 pub trait State: sealed::Sealed {
5959 type Did;
6060- type CreatedAt;
6160 type DisplayName;
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;
6868- type CreatedAt = Unset;
6968 type DisplayName = 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 CreatedAt = S::CreatedAt;
7776 type DisplayName = S::DisplayName;
7878- }
7979- ///State transition - sets the `created_at` field to Set
8080- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
8181- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
8282- impl<S: State> State for SetCreatedAt<S> {
8383- type Did = S::Did;
8484- type CreatedAt = Set<members::created_at>;
8585- type DisplayName = S::DisplayName;
7777+ type CreatedAt = S::CreatedAt;
8678 }
8779 ///State transition - sets the `display_name` field to Set
8880 pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>);
8981 impl<S: State> sealed::Sealed for SetDisplayName<S> {}
9082 impl<S: State> State for SetDisplayName<S> {
9183 type Did = S::Did;
9292- type CreatedAt = S::CreatedAt;
9384 type DisplayName = Set<members::display_name>;
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;
9292+ type DisplayName = S::DisplayName;
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 `did` field
9999 pub struct did(());
100100+ ///Marker type for the `display_name` field
101101+ pub struct display_name(());
100102 ///Marker type for the `created_at` field
101103 pub struct created_at(());
102102- ///Marker type for the `display_name` field
103103- pub struct display_name(());
104104 }
105105}
106106···318318where
319319 S: generator_state::State,
320320 S::Did: generator_state::IsSet,
321321- S::CreatedAt: generator_state::IsSet,
322321 S::DisplayName: generator_state::IsSet,
322322+ S::CreatedAt: generator_state::IsSet,
323323{
324324 /// Build the final struct
325325 pub fn build(self) -> Generator<'a> {
+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 Actor;
3737+ type IndexedAt;
3838 type CreatedAt;
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 Actor = Unset;
4545+ type IndexedAt = Unset;
4646 type CreatedAt = 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 Actor = S::Actor;
5454- type CreatedAt = S::CreatedAt;
5555- }
5648 ///State transition - sets the `actor` field to Set
5749 pub struct SetActor<S: State = Empty>(PhantomData<fn() -> S>);
5850 impl<S: State> sealed::Sealed for SetActor<S> {}
5951 impl<S: State> State for SetActor<S> {
6060- type IndexedAt = S::IndexedAt;
6152 type Actor = Set<members::actor>;
5353+ type IndexedAt = S::IndexedAt;
5454+ type CreatedAt = S::CreatedAt;
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 Actor = S::Actor;
6161+ type IndexedAt = Set<members::indexed_at>;
6262 type CreatedAt = S::CreatedAt;
6363 }
6464 ///State transition - sets the `created_at` field to Set
6565 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
6666 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
6767 impl<S: State> State for SetCreatedAt<S> {
6868- type IndexedAt = S::IndexedAt;
6968 type Actor = S::Actor;
6969+ type IndexedAt = S::IndexedAt;
7070 type CreatedAt = Set<members::created_at>;
7171 }
7272 /// Marker types for field names
7373 #[allow(non_camel_case_types)]
7474 pub mod members {
7575+ ///Marker type for the `actor` field
7676+ pub struct actor(());
7577 ///Marker type for the `indexed_at` field
7678 pub struct indexed_at(());
7777- ///Marker type for the `actor` field
7878- pub struct actor(());
7979 ///Marker type for the `created_at` field
8080 pub struct created_at(());
8181 }
···170170impl<'a, S> LikeBuilder<'a, S>
171171where
172172 S: like_state::State,
173173- S::IndexedAt: like_state::IsSet,
174173 S::Actor: like_state::IsSet,
174174+ S::IndexedAt: like_state::IsSet,
175175 S::CreatedAt: 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/post.rs
···12711271 }
12721272 /// State trait tracking which required fields have been set
12731273 pub trait State: sealed::Sealed {
12741274- type End;
12751274 type Start;
12751275+ type End;
12761276 }
12771277 /// Empty state - all required fields are unset
12781278 pub struct Empty(());
12791279 impl sealed::Sealed for Empty {}
12801280 impl State for Empty {
12811281- type End = Unset;
12821281 type Start = Unset;
12831283- }
12841284- ///State transition - sets the `end` field to Set
12851285- pub struct SetEnd<S: State = Empty>(PhantomData<fn() -> S>);
12861286- impl<S: State> sealed::Sealed for SetEnd<S> {}
12871287- impl<S: State> State for SetEnd<S> {
12881288- type End = Set<members::end>;
12891289- type Start = S::Start;
12821282+ type End = Unset;
12901283 }
12911284 ///State transition - sets the `start` field to Set
12921285 pub struct SetStart<S: State = Empty>(PhantomData<fn() -> S>);
12931286 impl<S: State> sealed::Sealed for SetStart<S> {}
12941287 impl<S: State> State for SetStart<S> {
12951295- type End = S::End;
12961288 type Start = Set<members::start>;
12891289+ type End = S::End;
12901290+ }
12911291+ ///State transition - sets the `end` field to Set
12921292+ pub struct SetEnd<S: State = Empty>(PhantomData<fn() -> S>);
12931293+ impl<S: State> sealed::Sealed for SetEnd<S> {}
12941294+ impl<S: State> State for SetEnd<S> {
12951295+ type Start = S::Start;
12961296+ type End = Set<members::end>;
12971297 }
12981298 /// Marker types for field names
12991299 #[allow(non_camel_case_types)]
13001300 pub mod members {
13011301- ///Marker type for the `end` field
13021302- pub struct end(());
13031301 ///Marker type for the `start` field
13041302 pub struct start(());
13031303+ ///Marker type for the `end` field
13041304+ pub struct end(());
13051305 }
13061306}
13071307···13711371impl<'a, S> TextSliceBuilder<'a, S>
13721372where
13731373 S: text_slice_state::State,
13741374- S::End: text_slice_state::IsSet,
13751374 S::Start: text_slice_state::IsSet,
13751375+ S::End: text_slice_state::IsSet,
13761376{
13771377 /// Build the final struct
13781378 pub fn build(self) -> TextSlice<'a> {
+13-13
crates/weaver-api/src/app_bsky/feed/postgate.rs
···224224 }
225225 /// State trait tracking which required fields have been set
226226 pub trait State: sealed::Sealed {
227227- type Post;
228227 type CreatedAt;
228228+ type Post;
229229 }
230230 /// Empty state - all required fields are unset
231231 pub struct Empty(());
232232 impl sealed::Sealed for Empty {}
233233 impl State for Empty {
234234- type Post = Unset;
235234 type CreatedAt = Unset;
236236- }
237237- ///State transition - sets the `post` field to Set
238238- pub struct SetPost<S: State = Empty>(PhantomData<fn() -> S>);
239239- impl<S: State> sealed::Sealed for SetPost<S> {}
240240- impl<S: State> State for SetPost<S> {
241241- type Post = Set<members::post>;
242242- type CreatedAt = S::CreatedAt;
235235+ type Post = Unset;
243236 }
244237 ///State transition - sets the `created_at` field to Set
245238 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
246239 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
247240 impl<S: State> State for SetCreatedAt<S> {
248248- type Post = S::Post;
249241 type CreatedAt = Set<members::created_at>;
242242+ type Post = S::Post;
243243+ }
244244+ ///State transition - sets the `post` field to Set
245245+ pub struct SetPost<S: State = Empty>(PhantomData<fn() -> S>);
246246+ impl<S: State> sealed::Sealed for SetPost<S> {}
247247+ impl<S: State> State for SetPost<S> {
248248+ type CreatedAt = S::CreatedAt;
249249+ type Post = Set<members::post>;
250250 }
251251 /// Marker types for field names
252252 #[allow(non_camel_case_types)]
253253 pub mod members {
254254- ///Marker type for the `post` field
255255- pub struct post(());
256254 ///Marker type for the `created_at` field
257255 pub struct created_at(());
256256+ ///Marker type for the `post` field
257257+ pub struct post(());
258258 }
259259}
260260···367367impl<'a, S> PostgateBuilder<'a, S>
368368where
369369 S: postgate_state::State,
370370- S::Post: postgate_state::IsSet,
371370 S::CreatedAt: postgate_state::IsSet,
371371+ S::Post: postgate_state::IsSet,
372372{
373373 /// Build the final struct
374374 pub fn build(self) -> Postgate<'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 CreatedAt;
467466 type Post;
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;
474473 type Post = Unset;
475475- }
476476- ///State transition - sets the `created_at` field to Set
477477- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
478478- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
479479- impl<S: State> State for SetCreatedAt<S> {
480480- type CreatedAt = Set<members::created_at>;
481481- type Post = S::Post;
474474+ type CreatedAt = Unset;
482475 }
483476 ///State transition - sets the `post` field to Set
484477 pub struct SetPost<S: State = Empty>(PhantomData<fn() -> S>);
485478 impl<S: State> sealed::Sealed for SetPost<S> {}
486479 impl<S: State> State for SetPost<S> {
487487- type CreatedAt = S::CreatedAt;
488480 type Post = Set<members::post>;
481481+ type CreatedAt = S::CreatedAt;
482482+ }
483483+ ///State transition - sets the `created_at` field to Set
484484+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
485485+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
486486+ impl<S: State> State for SetCreatedAt<S> {
487487+ type Post = S::Post;
488488+ type CreatedAt = Set<members::created_at>;
489489 }
490490 /// Marker types for field names
491491 #[allow(non_camel_case_types)]
492492 pub mod members {
493493- ///Marker type for the `created_at` field
494494- pub struct created_at(());
495493 ///Marker type for the `post` field
496494 pub struct post(());
495495+ ///Marker type for the `created_at` field
496496+ pub struct created_at(());
497497 }
498498}
499499···603603impl<'a, S> ThreadgateBuilder<'a, S>
604604where
605605 S: threadgate_state::State,
606606- S::CreatedAt: threadgate_state::IsSet,
607606 S::Post: threadgate_state::IsSet,
607607+ S::CreatedAt: threadgate_state::IsSet,
608608{
609609 /// Build the final struct
610610 pub fn build(self) -> Threadgate<'a> {
+187-187
crates/weaver-api/src/app_bsky/graph.rs
···8282 }
8383 /// State trait tracking which required fields have been set
8484 pub trait State: sealed::Sealed {
8585- type Uri;
8685 type Subject;
8686+ type Uri;
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 Uri = Unset;
9392 type Subject = Unset;
9494- }
9595- ///State transition - sets the `uri` field to Set
9696- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
9797- impl<S: State> sealed::Sealed for SetUri<S> {}
9898- impl<S: State> State for SetUri<S> {
9999- type Uri = Set<members::uri>;
100100- type Subject = S::Subject;
9393+ type Uri = Unset;
10194 }
10295 ///State transition - sets the `subject` field to Set
10396 pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
10497 impl<S: State> sealed::Sealed for SetSubject<S> {}
10598 impl<S: State> State for SetSubject<S> {
106106- type Uri = S::Uri;
10799 type Subject = Set<members::subject>;
100100+ type Uri = S::Uri;
101101+ }
102102+ ///State transition - sets the `uri` field to Set
103103+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
104104+ impl<S: State> sealed::Sealed for SetUri<S> {}
105105+ impl<S: State> State for SetUri<S> {
106106+ type Subject = S::Subject;
107107+ type Uri = Set<members::uri>;
108108 }
109109 /// Marker types for field names
110110 #[allow(non_camel_case_types)]
111111 pub mod members {
112112- ///Marker type for the `uri` field
113113- pub struct uri(());
114112 ///Marker type for the `subject` field
115113 pub struct subject(());
114114+ ///Marker type for the `uri` field
115115+ pub struct uri(());
116116 }
117117}
118118···185185impl<'a, S> ListItemViewBuilder<'a, S>
186186where
187187 S: list_item_view_state::State,
188188- S::Uri: list_item_view_state::IsSet,
189188 S::Subject: list_item_view_state::IsSet,
189189+ S::Uri: list_item_view_state::IsSet,
190190{
191191 /// Build the final struct
192192 pub fn build(self) -> ListItemView<'a> {
···12831283 }
12841284 /// State trait tracking which required fields have been set
12851285 pub trait State: sealed::Sealed {
12861286+ type Uri;
12871287+ type IndexedAt;
12881288+ type Creator;
12891289+ type Cid;
12861290 type Purpose;
12871291 type Name;
12881288- type Cid;
12891289- type Creator;
12901290- type IndexedAt;
12911291- type Uri;
12921292 }
12931293 /// Empty state - all required fields are unset
12941294 pub struct Empty(());
12951295 impl sealed::Sealed for Empty {}
12961296 impl State for Empty {
12971297+ type Uri = Unset;
12981298+ type IndexedAt = Unset;
12991299+ type Creator = Unset;
13001300+ type Cid = Unset;
12971301 type Purpose = Unset;
12981302 type Name = Unset;
12991299- type Cid = Unset;
13001300- type Creator = Unset;
13011301- type IndexedAt = Unset;
13021302- type Uri = Unset;
13031303 }
13041304- ///State transition - sets the `purpose` field to Set
13051305- pub struct SetPurpose<S: State = Empty>(PhantomData<fn() -> S>);
13061306- impl<S: State> sealed::Sealed for SetPurpose<S> {}
13071307- impl<S: State> State for SetPurpose<S> {
13081308- type Purpose = Set<members::purpose>;
13091309- type Name = S::Name;
13101310- type Cid = S::Cid;
13041304+ ///State transition - sets the `uri` field to Set
13051305+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
13061306+ impl<S: State> sealed::Sealed for SetUri<S> {}
13071307+ impl<S: State> State for SetUri<S> {
13081308+ type Uri = Set<members::uri>;
13091309+ type IndexedAt = S::IndexedAt;
13111310 type Creator = S::Creator;
13121312- type IndexedAt = S::IndexedAt;
13131313- type Uri = S::Uri;
13111311+ type Cid = S::Cid;
13121312+ type Purpose = S::Purpose;
13131313+ type Name = S::Name;
13141314 }
13151315- ///State transition - sets the `name` field to Set
13161316- pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
13171317- impl<S: State> sealed::Sealed for SetName<S> {}
13181318- impl<S: State> State for SetName<S> {
13191319- type Purpose = S::Purpose;
13201320- type Name = Set<members::name>;
13151315+ ///State transition - sets the `indexed_at` field to Set
13161316+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
13171317+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
13181318+ impl<S: State> State for SetIndexedAt<S> {
13191319+ type Uri = S::Uri;
13201320+ type IndexedAt = Set<members::indexed_at>;
13211321+ type Creator = S::Creator;
13211322 type Cid = S::Cid;
13221322- type Creator = S::Creator;
13231323- type IndexedAt = S::IndexedAt;
13241324- type Uri = S::Uri;
13251325- }
13261326- ///State transition - sets the `cid` field to Set
13271327- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
13281328- impl<S: State> sealed::Sealed for SetCid<S> {}
13291329- impl<S: State> State for SetCid<S> {
13301323 type Purpose = S::Purpose;
13311324 type Name = S::Name;
13321332- type Cid = Set<members::cid>;
13331333- type Creator = S::Creator;
13341334- type IndexedAt = S::IndexedAt;
13351335- type Uri = S::Uri;
13361325 }
13371326 ///State transition - sets the `creator` field to Set
13381327 pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
13391328 impl<S: State> sealed::Sealed for SetCreator<S> {}
13401329 impl<S: State> State for SetCreator<S> {
13301330+ type Uri = S::Uri;
13311331+ type IndexedAt = S::IndexedAt;
13321332+ type Creator = Set<members::creator>;
13331333+ type Cid = S::Cid;
13411334 type Purpose = S::Purpose;
13421335 type Name = S::Name;
13431343- type Cid = S::Cid;
13441344- type Creator = Set<members::creator>;
13451345- type IndexedAt = S::IndexedAt;
13461346- type Uri = S::Uri;
13471336 }
13481348- ///State transition - sets the `indexed_at` field to Set
13491349- pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
13501350- impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
13511351- impl<S: State> State for SetIndexedAt<S> {
13371337+ ///State transition - sets the `cid` field to Set
13381338+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
13391339+ impl<S: State> sealed::Sealed for SetCid<S> {}
13401340+ impl<S: State> State for SetCid<S> {
13411341+ type Uri = S::Uri;
13421342+ type IndexedAt = S::IndexedAt;
13431343+ type Creator = S::Creator;
13441344+ type Cid = Set<members::cid>;
13521345 type Purpose = S::Purpose;
13531346 type Name = S::Name;
13471347+ }
13481348+ ///State transition - sets the `purpose` field to Set
13491349+ pub struct SetPurpose<S: State = Empty>(PhantomData<fn() -> S>);
13501350+ impl<S: State> sealed::Sealed for SetPurpose<S> {}
13511351+ impl<S: State> State for SetPurpose<S> {
13521352+ type Uri = S::Uri;
13531353+ type IndexedAt = S::IndexedAt;
13541354+ type Creator = S::Creator;
13541355 type Cid = S::Cid;
13551355- type Creator = S::Creator;
13561356- type IndexedAt = Set<members::indexed_at>;
13561356+ type Purpose = Set<members::purpose>;
13571357+ type Name = S::Name;
13581358+ }
13591359+ ///State transition - sets the `name` field to Set
13601360+ pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
13611361+ impl<S: State> sealed::Sealed for SetName<S> {}
13621362+ impl<S: State> State for SetName<S> {
13571363 type Uri = S::Uri;
13581358- }
13591359- ///State transition - sets the `uri` field to Set
13601360- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
13611361- impl<S: State> sealed::Sealed for SetUri<S> {}
13621362- impl<S: State> State for SetUri<S> {
13641364+ type IndexedAt = S::IndexedAt;
13651365+ type Creator = S::Creator;
13661366+ type Cid = S::Cid;
13631367 type Purpose = S::Purpose;
13641364- type Name = S::Name;
13651365- type Cid = S::Cid;
13661366- type Creator = S::Creator;
13671367- type IndexedAt = S::IndexedAt;
13681368- type Uri = Set<members::uri>;
13681368+ type Name = Set<members::name>;
13691369 }
13701370 /// Marker types for field names
13711371 #[allow(non_camel_case_types)]
13721372 pub mod members {
13731373+ ///Marker type for the `uri` field
13741374+ pub struct uri(());
13751375+ ///Marker type for the `indexed_at` field
13761376+ pub struct indexed_at(());
13771377+ ///Marker type for the `creator` field
13781378+ pub struct creator(());
13791379+ ///Marker type for the `cid` field
13801380+ pub struct cid(());
13731381 ///Marker type for the `purpose` field
13741382 pub struct purpose(());
13751383 ///Marker type for the `name` field
13761384 pub struct name(());
13771377- ///Marker type for the `cid` field
13781378- pub struct cid(());
13791379- ///Marker type for the `creator` field
13801380- pub struct creator(());
13811381- ///Marker type for the `indexed_at` field
13821382- pub struct indexed_at(());
13831383- ///Marker type for the `uri` field
13841384- pub struct uri(());
13851385 }
13861386}
13871387···16611661impl<'a, S> ListViewBuilder<'a, S>
16621662where
16631663 S: list_view_state::State,
16641664+ S::Uri: list_view_state::IsSet,
16651665+ S::IndexedAt: list_view_state::IsSet,
16661666+ S::Creator: list_view_state::IsSet,
16671667+ S::Cid: list_view_state::IsSet,
16641668 S::Purpose: list_view_state::IsSet,
16651669 S::Name: list_view_state::IsSet,
16661666- S::Cid: list_view_state::IsSet,
16671667- S::Creator: list_view_state::IsSet,
16681668- S::IndexedAt: list_view_state::IsSet,
16691669- S::Uri: list_view_state::IsSet,
16701670{
16711671 /// Build the final struct
16721672 pub fn build(self) -> ListView<'a> {
···18411841 }
18421842 /// State trait tracking which required fields have been set
18431843 pub trait State: sealed::Sealed {
18441844+ type Cid;
18441845 type Name;
18451845- type Purpose;
18461846 type Uri;
18471847- type Cid;
18471847+ type Purpose;
18481848 }
18491849 /// Empty state - all required fields are unset
18501850 pub struct Empty(());
18511851 impl sealed::Sealed for Empty {}
18521852 impl State for Empty {
18531853+ type Cid = Unset;
18531854 type Name = Unset;
18551855+ type Uri = Unset;
18541856 type Purpose = Unset;
18551855- type Uri = Unset;
18561856- type Cid = Unset;
18571857+ }
18581858+ ///State transition - sets the `cid` field to Set
18591859+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
18601860+ impl<S: State> sealed::Sealed for SetCid<S> {}
18611861+ impl<S: State> State for SetCid<S> {
18621862+ type Cid = Set<members::cid>;
18631863+ type Name = S::Name;
18641864+ type Uri = S::Uri;
18651865+ type Purpose = S::Purpose;
18571866 }
18581867 ///State transition - sets the `name` field to Set
18591868 pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
18601869 impl<S: State> sealed::Sealed for SetName<S> {}
18611870 impl<S: State> State for SetName<S> {
18621862- type Name = Set<members::name>;
18631863- type Purpose = S::Purpose;
18641864- type Uri = S::Uri;
18651871 type Cid = S::Cid;
18661866- }
18671867- ///State transition - sets the `purpose` field to Set
18681868- pub struct SetPurpose<S: State = Empty>(PhantomData<fn() -> S>);
18691869- impl<S: State> sealed::Sealed for SetPurpose<S> {}
18701870- impl<S: State> State for SetPurpose<S> {
18711871- type Name = S::Name;
18721872- type Purpose = Set<members::purpose>;
18721872+ type Name = Set<members::name>;
18731873 type Uri = S::Uri;
18741874- type Cid = S::Cid;
18741874+ type Purpose = S::Purpose;
18751875 }
18761876 ///State transition - sets the `uri` field to Set
18771877 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
18781878 impl<S: State> sealed::Sealed for SetUri<S> {}
18791879 impl<S: State> State for SetUri<S> {
18801880+ type Cid = S::Cid;
18801881 type Name = S::Name;
18811881- type Purpose = S::Purpose;
18821882 type Uri = Set<members::uri>;
18831883- type Cid = S::Cid;
18831883+ type Purpose = S::Purpose;
18841884 }
18851885- ///State transition - sets the `cid` field to Set
18861886- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
18871887- impl<S: State> sealed::Sealed for SetCid<S> {}
18881888- impl<S: State> State for SetCid<S> {
18851885+ ///State transition - sets the `purpose` field to Set
18861886+ pub struct SetPurpose<S: State = Empty>(PhantomData<fn() -> S>);
18871887+ impl<S: State> sealed::Sealed for SetPurpose<S> {}
18881888+ impl<S: State> State for SetPurpose<S> {
18891889+ type Cid = S::Cid;
18891890 type Name = S::Name;
18901890- type Purpose = S::Purpose;
18911891 type Uri = S::Uri;
18921892- type Cid = Set<members::cid>;
18921892+ type Purpose = Set<members::purpose>;
18931893 }
18941894 /// Marker types for field names
18951895 #[allow(non_camel_case_types)]
18961896 pub mod members {
18971897+ ///Marker type for the `cid` field
18981898+ pub struct cid(());
18971899 ///Marker type for the `name` field
18981900 pub struct name(());
19011901+ ///Marker type for the `uri` field
19021902+ pub struct uri(());
18991903 ///Marker type for the `purpose` field
19001904 pub struct purpose(());
19011901- ///Marker type for the `uri` field
19021902- pub struct uri(());
19031903- ///Marker type for the `cid` field
19041904- pub struct cid(());
19051905 }
19061906}
19071907···21182118impl<'a, S> ListViewBasicBuilder<'a, S>
21192119where
21202120 S: list_view_basic_state::State,
21212121+ S::Cid: list_view_basic_state::IsSet,
21212122 S::Name: list_view_basic_state::IsSet,
21222122- S::Purpose: list_view_basic_state::IsSet,
21232123 S::Uri: list_view_basic_state::IsSet,
21242124- S::Cid: list_view_basic_state::IsSet,
21242124+ S::Purpose: list_view_basic_state::IsSet,
21252125{
21262126 /// Build the final struct
21272127 pub fn build(self) -> ListViewBasic<'a> {
···22982298 }
22992299 /// State trait tracking which required fields have been set
23002300 pub trait State: sealed::Sealed {
23012301- type Actor;
23022301 type NotFound;
23022302+ type Actor;
23032303 }
23042304 /// Empty state - all required fields are unset
23052305 pub struct Empty(());
23062306 impl sealed::Sealed for Empty {}
23072307 impl State for Empty {
23082308- type Actor = Unset;
23092308 type NotFound = Unset;
23102310- }
23112311- ///State transition - sets the `actor` field to Set
23122312- pub struct SetActor<S: State = Empty>(PhantomData<fn() -> S>);
23132313- impl<S: State> sealed::Sealed for SetActor<S> {}
23142314- impl<S: State> State for SetActor<S> {
23152315- type Actor = Set<members::actor>;
23162316- type NotFound = S::NotFound;
23092309+ type Actor = Unset;
23172310 }
23182311 ///State transition - sets the `not_found` field to Set
23192312 pub struct SetNotFound<S: State = Empty>(PhantomData<fn() -> S>);
23202313 impl<S: State> sealed::Sealed for SetNotFound<S> {}
23212314 impl<S: State> State for SetNotFound<S> {
23222322- type Actor = S::Actor;
23232315 type NotFound = Set<members::not_found>;
23162316+ type Actor = S::Actor;
23172317+ }
23182318+ ///State transition - sets the `actor` field to Set
23192319+ pub struct SetActor<S: State = Empty>(PhantomData<fn() -> S>);
23202320+ impl<S: State> sealed::Sealed for SetActor<S> {}
23212321+ impl<S: State> State for SetActor<S> {
23222322+ type NotFound = S::NotFound;
23232323+ type Actor = Set<members::actor>;
23242324 }
23252325 /// Marker types for field names
23262326 #[allow(non_camel_case_types)]
23272327 pub mod members {
23282328+ ///Marker type for the `not_found` field
23292329+ pub struct not_found(());
23282330 ///Marker type for the `actor` field
23292331 pub struct actor(());
23302330- ///Marker type for the `not_found` field
23312331- pub struct not_found(());
23322332 }
23332333}
23342334···24012401impl<'a, S> NotFoundActorBuilder<'a, S>
24022402where
24032403 S: not_found_actor_state::State,
24042404- S::Actor: not_found_actor_state::IsSet,
24052404 S::NotFound: not_found_actor_state::IsSet,
24052405+ S::Actor: not_found_actor_state::IsSet,
24062406{
24072407 /// Build the final struct
24082408 pub fn build(self) -> NotFoundActor<'a> {
···27062706 /// State trait tracking which required fields have been set
27072707 pub trait State: sealed::Sealed {
27082708 type Creator;
27092709- type Uri;
27102710- type Record;
27112709 type IndexedAt;
27102710+ type Uri;
27122711 type Cid;
27122712+ type Record;
27132713 }
27142714 /// Empty state - all required fields are unset
27152715 pub struct Empty(());
27162716 impl sealed::Sealed for Empty {}
27172717 impl State for Empty {
27182718 type Creator = Unset;
27192719- type Uri = Unset;
27202720- type Record = Unset;
27212719 type IndexedAt = Unset;
27202720+ type Uri = Unset;
27222721 type Cid = Unset;
27222722+ type Record = Unset;
27232723 }
27242724 ///State transition - sets the `creator` field to Set
27252725 pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
27262726 impl<S: State> sealed::Sealed for SetCreator<S> {}
27272727 impl<S: State> State for SetCreator<S> {
27282728 type Creator = Set<members::creator>;
27292729+ type IndexedAt = S::IndexedAt;
27292730 type Uri = S::Uri;
27312731+ type Cid = S::Cid;
27302732 type Record = S::Record;
27312731- type IndexedAt = S::IndexedAt;
27332733+ }
27342734+ ///State transition - sets the `indexed_at` field to Set
27352735+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
27362736+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
27372737+ impl<S: State> State for SetIndexedAt<S> {
27382738+ type Creator = S::Creator;
27392739+ type IndexedAt = Set<members::indexed_at>;
27402740+ type Uri = S::Uri;
27322741 type Cid = S::Cid;
27422742+ type Record = S::Record;
27332743 }
27342744 ///State transition - sets the `uri` field to Set
27352745 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
27362746 impl<S: State> sealed::Sealed for SetUri<S> {}
27372747 impl<S: State> State for SetUri<S> {
27382748 type Creator = S::Creator;
27492749+ type IndexedAt = S::IndexedAt;
27392750 type Uri = Set<members::uri>;
27512751+ type Cid = S::Cid;
27402752 type Record = S::Record;
27532753+ }
27542754+ ///State transition - sets the `cid` field to Set
27552755+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
27562756+ impl<S: State> sealed::Sealed for SetCid<S> {}
27572757+ impl<S: State> State for SetCid<S> {
27582758+ type Creator = S::Creator;
27412759 type IndexedAt = S::IndexedAt;
27422742- type Cid = S::Cid;
27602760+ type Uri = S::Uri;
27612761+ type Cid = Set<members::cid>;
27622762+ type Record = S::Record;
27432763 }
27442764 ///State transition - sets the `record` field to Set
27452765 pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
27462766 impl<S: State> sealed::Sealed for SetRecord<S> {}
27472767 impl<S: State> State for SetRecord<S> {
27482768 type Creator = S::Creator;
27492749- type Uri = S::Uri;
27502750- type Record = Set<members::record>;
27512769 type IndexedAt = S::IndexedAt;
27522752- type Cid = S::Cid;
27532753- }
27542754- ///State transition - sets the `indexed_at` field to Set
27552755- pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
27562756- impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
27572757- impl<S: State> State for SetIndexedAt<S> {
27582758- type Creator = S::Creator;
27592770 type Uri = S::Uri;
27602760- type Record = S::Record;
27612761- type IndexedAt = Set<members::indexed_at>;
27622771 type Cid = S::Cid;
27632763- }
27642764- ///State transition - sets the `cid` field to Set
27652765- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
27662766- impl<S: State> sealed::Sealed for SetCid<S> {}
27672767- impl<S: State> State for SetCid<S> {
27682768- type Creator = S::Creator;
27692769- type Uri = S::Uri;
27702770- type Record = S::Record;
27712771- type IndexedAt = S::IndexedAt;
27722772- type Cid = Set<members::cid>;
27722772+ type Record = Set<members::record>;
27732773 }
27742774 /// Marker types for field names
27752775 #[allow(non_camel_case_types)]
27762776 pub mod members {
27772777 ///Marker type for the `creator` field
27782778 pub struct creator(());
27792779- ///Marker type for the `uri` field
27802780- pub struct uri(());
27812781- ///Marker type for the `record` field
27822782- pub struct record(());
27832779 ///Marker type for the `indexed_at` field
27842780 pub struct indexed_at(());
27812781+ ///Marker type for the `uri` field
27822782+ pub struct uri(());
27852783 ///Marker type for the `cid` field
27862784 pub struct cid(());
27852785+ ///Marker type for the `record` field
27862786+ pub struct record(());
27872787 }
27882788}
27892789···30373037where
30383038 S: starter_pack_view_state::State,
30393039 S::Creator: starter_pack_view_state::IsSet,
30403040- S::Uri: starter_pack_view_state::IsSet,
30413041- S::Record: starter_pack_view_state::IsSet,
30423040 S::IndexedAt: starter_pack_view_state::IsSet,
30413041+ S::Uri: starter_pack_view_state::IsSet,
30433042 S::Cid: starter_pack_view_state::IsSet,
30433043+ S::Record: starter_pack_view_state::IsSet,
30443044{
30453045 /// Build the final struct
30463046 pub fn build(self) -> StarterPackView<'a> {
···31893189 }
31903190 /// State trait tracking which required fields have been set
31913191 pub trait State: sealed::Sealed {
31923192- type Cid;
31933192 type Creator;
31943193 type IndexedAt;
31943194+ type Record;
31953195 type Uri;
31963196- type Record;
31963196+ type Cid;
31973197 }
31983198 /// Empty state - all required fields are unset
31993199 pub struct Empty(());
32003200 impl sealed::Sealed for Empty {}
32013201 impl State for Empty {
32023202- type Cid = Unset;
32033202 type Creator = Unset;
32043203 type IndexedAt = Unset;
32053205- type Uri = Unset;
32063204 type Record = Unset;
32073207- }
32083208- ///State transition - sets the `cid` field to Set
32093209- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
32103210- impl<S: State> sealed::Sealed for SetCid<S> {}
32113211- impl<S: State> State for SetCid<S> {
32123212- type Cid = Set<members::cid>;
32133213- type Creator = S::Creator;
32143214- type IndexedAt = S::IndexedAt;
32153215- type Uri = S::Uri;
32163216- type Record = S::Record;
32053205+ type Uri = Unset;
32063206+ type Cid = Unset;
32173207 }
32183208 ///State transition - sets the `creator` field to Set
32193209 pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
32203210 impl<S: State> sealed::Sealed for SetCreator<S> {}
32213211 impl<S: State> State for SetCreator<S> {
32223222- type Cid = S::Cid;
32233212 type Creator = Set<members::creator>;
32243213 type IndexedAt = S::IndexedAt;
32143214+ type Record = S::Record;
32253215 type Uri = S::Uri;
32263226- type Record = S::Record;
32163216+ type Cid = S::Cid;
32273217 }
32283218 ///State transition - sets the `indexed_at` field to Set
32293219 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
32303220 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
32313221 impl<S: State> State for SetIndexedAt<S> {
32223222+ type Creator = S::Creator;
32233223+ type IndexedAt = Set<members::indexed_at>;
32243224+ type Record = S::Record;
32253225+ type Uri = S::Uri;
32323226 type Cid = S::Cid;
32273227+ }
32283228+ ///State transition - sets the `record` field to Set
32293229+ pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
32303230+ impl<S: State> sealed::Sealed for SetRecord<S> {}
32313231+ impl<S: State> State for SetRecord<S> {
32333232 type Creator = S::Creator;
32343234- type IndexedAt = Set<members::indexed_at>;
32333233+ type IndexedAt = S::IndexedAt;
32343234+ type Record = Set<members::record>;
32353235 type Uri = S::Uri;
32363236- type Record = S::Record;
32363236+ type Cid = S::Cid;
32373237 }
32383238 ///State transition - sets the `uri` field to Set
32393239 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
32403240 impl<S: State> sealed::Sealed for SetUri<S> {}
32413241 impl<S: State> State for SetUri<S> {
32423242- type Cid = S::Cid;
32433242 type Creator = S::Creator;
32443243 type IndexedAt = S::IndexedAt;
32453245- type Uri = Set<members::uri>;
32463244 type Record = S::Record;
32473247- }
32483248- ///State transition - sets the `record` field to Set
32493249- pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
32503250- impl<S: State> sealed::Sealed for SetRecord<S> {}
32513251- impl<S: State> State for SetRecord<S> {
32453245+ type Uri = Set<members::uri>;
32523246 type Cid = S::Cid;
32473247+ }
32483248+ ///State transition - sets the `cid` field to Set
32493249+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
32503250+ impl<S: State> sealed::Sealed for SetCid<S> {}
32513251+ impl<S: State> State for SetCid<S> {
32533252 type Creator = S::Creator;
32543253 type IndexedAt = S::IndexedAt;
32543254+ type Record = S::Record;
32553255 type Uri = S::Uri;
32563256- type Record = Set<members::record>;
32563256+ type Cid = Set<members::cid>;
32573257 }
32583258 /// Marker types for field names
32593259 #[allow(non_camel_case_types)]
32603260 pub mod members {
32613261- ///Marker type for the `cid` field
32623262- pub struct cid(());
32633261 ///Marker type for the `creator` field
32643262 pub struct creator(());
32653263 ///Marker type for the `indexed_at` field
32663264 pub struct indexed_at(());
32673267- ///Marker type for the `uri` field
32683268- pub struct uri(());
32693265 ///Marker type for the `record` field
32703266 pub struct record(());
32673267+ ///Marker type for the `uri` field
32683268+ pub struct uri(());
32693269+ ///Marker type for the `cid` field
32703270+ pub struct cid(());
32713271 }
32723272}
32733273···34783478impl<'a, S> StarterPackViewBasicBuilder<'a, S>
34793479where
34803480 S: starter_pack_view_basic_state::State,
34813481- S::Cid: starter_pack_view_basic_state::IsSet,
34823481 S::Creator: starter_pack_view_basic_state::IsSet,
34833482 S::IndexedAt: starter_pack_view_basic_state::IsSet,
34843484- S::Uri: starter_pack_view_basic_state::IsSet,
34853483 S::Record: starter_pack_view_basic_state::IsSet,
34843484+ S::Uri: starter_pack_view_basic_state::IsSet,
34853485+ S::Cid: starter_pack_view_basic_state::IsSet,
34863486{
34873487 /// Build the final struct
34883488 pub fn build(self) -> StarterPackViewBasic<'a> {
+13-13
crates/weaver-api/src/app_bsky/graph/follow.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> FollowBuilder<'a, S>
160160where
161161 S: follow_state::State,
162162- S::Subject: follow_state::IsSet,
163162 S::CreatedAt: follow_state::IsSet,
163163+ S::Subject: follow_state::IsSet,
164164{
165165 /// Build the final struct
166166 pub fn build(self) -> Follow<'a> {
+24-24
crates/weaver-api/src/app_bsky/graph/list.rs
···5151 }
5252 /// State trait tracking which required fields have been set
5353 pub trait State: sealed::Sealed {
5454- type Name;
5555- type CreatedAt;
5654 type Purpose;
5555+ type CreatedAt;
5656+ type Name;
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 Purpose = Unset;
6363+ type CreatedAt = Unset;
6264 type Name = Unset;
6363- type CreatedAt = Unset;
6464- type Purpose = Unset;
6565 }
6666- ///State transition - sets the `name` field to Set
6767- pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
6868- impl<S: State> sealed::Sealed for SetName<S> {}
6969- impl<S: State> State for SetName<S> {
7070- type Name = Set<members::name>;
6666+ ///State transition - sets the `purpose` field to Set
6767+ pub struct SetPurpose<S: State = Empty>(PhantomData<fn() -> S>);
6868+ impl<S: State> sealed::Sealed for SetPurpose<S> {}
6969+ impl<S: State> State for SetPurpose<S> {
7070+ type Purpose = Set<members::purpose>;
7171 type CreatedAt = S::CreatedAt;
7272- type Purpose = S::Purpose;
7272+ type Name = S::Name;
7373 }
7474 ///State transition - sets the `created_at` field to Set
7575 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
7676 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
7777 impl<S: State> State for SetCreatedAt<S> {
7878- type Name = S::Name;
7979- type CreatedAt = Set<members::created_at>;
8078 type Purpose = S::Purpose;
7979+ type CreatedAt = Set<members::created_at>;
8080+ type Name = S::Name;
8181 }
8282- ///State transition - sets the `purpose` field to Set
8383- pub struct SetPurpose<S: State = Empty>(PhantomData<fn() -> S>);
8484- impl<S: State> sealed::Sealed for SetPurpose<S> {}
8585- impl<S: State> State for SetPurpose<S> {
8686- type Name = S::Name;
8282+ ///State transition - sets the `name` field to Set
8383+ pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
8484+ impl<S: State> sealed::Sealed for SetName<S> {}
8585+ impl<S: State> State for SetName<S> {
8686+ type Purpose = S::Purpose;
8787 type CreatedAt = S::CreatedAt;
8888- type Purpose = Set<members::purpose>;
8888+ type Name = Set<members::name>;
8989 }
9090 /// Marker types for field names
9191 #[allow(non_camel_case_types)]
9292 pub mod members {
9393+ ///Marker type for the `purpose` field
9494+ pub struct purpose(());
9595+ ///Marker type for the `created_at` field
9696+ pub struct created_at(());
9397 ///Marker type for the `name` field
9498 pub struct name(());
9595- ///Marker type for the `created_at` field
9696- pub struct created_at(());
9797- ///Marker type for the `purpose` field
9898- pub struct purpose(());
9999 }
100100}
101101···268268impl<'a, S> ListBuilder<'a, S>
269269where
270270 S: list_state::State,
271271- S::Name: list_state::IsSet,
272272- S::CreatedAt: list_state::IsSet,
273271 S::Purpose: list_state::IsSet,
272272+ S::CreatedAt: list_state::IsSet,
273273+ S::Name: list_state::IsSet,
274274{
275275 /// Build the final struct
276276 pub fn build(self) -> List<'a> {
+24-24
crates/weaver-api/src/app_bsky/graph/listitem.rs
···3737 }
3838 /// State trait tracking which required fields have been set
3939 pub trait State: sealed::Sealed {
4040- type Subject;
4141- type List;
4240 type CreatedAt;
4141+ type List;
4242+ type Subject;
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 CreatedAt = Unset;
4949+ type List = Unset;
4850 type Subject = Unset;
4949- type List = Unset;
5050- type CreatedAt = 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>;
5252+ ///State transition - sets the `created_at` field to Set
5353+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
5454+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
5555+ impl<S: State> State for SetCreatedAt<S> {
5656+ type CreatedAt = Set<members::created_at>;
5757 type List = S::List;
5858- type CreatedAt = S::CreatedAt;
5858+ type Subject = S::Subject;
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>;
6664 type CreatedAt = S::CreatedAt;
6565+ type List = Set<members::list>;
6666+ type Subject = S::Subject;
6767 }
6868- ///State transition - sets the `created_at` field to Set
6969- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
7070- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
7171- impl<S: State> State for SetCreatedAt<S> {
7272- type Subject = S::Subject;
6868+ ///State transition - sets the `subject` field to Set
6969+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
7070+ impl<S: State> sealed::Sealed for SetSubject<S> {}
7171+ impl<S: State> State for SetSubject<S> {
7272+ type CreatedAt = S::CreatedAt;
7373 type List = S::List;
7474- type CreatedAt = Set<members::created_at>;
7474+ type Subject = Set<members::subject>;
7575 }
7676 /// Marker types for field names
7777 #[allow(non_camel_case_types)]
7878 pub mod members {
7979+ ///Marker type for the `created_at` field
8080+ pub struct created_at(());
8181+ ///Marker type for the `list` field
8282+ pub struct list(());
7983 ///Marker type for the `subject` field
8084 pub struct subject(());
8181- ///Marker type for the `list` field
8282- pub struct list(());
8383- ///Marker type for the `created_at` field
8484- pub struct created_at(());
8585 }
8686}
8787···174174impl<'a, S> ListitemBuilder<'a, S>
175175where
176176 S: listitem_state::State,
177177- S::Subject: listitem_state::IsSet,
178178- S::List: listitem_state::IsSet,
179177 S::CreatedAt: listitem_state::IsSet,
178178+ S::List: listitem_state::IsSet,
179179+ S::Subject: listitem_state::IsSet,
180180{
181181 /// Build the final struct
182182 pub fn build(self) -> Listitem<'a> {
···367367 /// State trait tracking which required fields have been set
368368 pub trait State: sealed::Sealed {
369369 type Name;
370370- type List;
371370 type CreatedAt;
371371+ type List;
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;
378378- type List = Unset;
379378 type CreatedAt = Unset;
379379+ type List = 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;
387386 type CreatedAt = S::CreatedAt;
388388- }
389389- ///State transition - sets the `list` field to Set
390390- pub struct SetList<S: State = Empty>(PhantomData<fn() -> S>);
391391- impl<S: State> sealed::Sealed for SetList<S> {}
392392- impl<S: State> State for SetList<S> {
393393- type Name = S::Name;
394394- type List = Set<members::list>;
395395- type CreatedAt = S::CreatedAt;
387387+ type List = S::List;
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> {
401393 type Name = S::Name;
402402- type List = S::List;
403394 type CreatedAt = Set<members::created_at>;
395395+ type List = S::List;
396396+ }
397397+ ///State transition - sets the `list` field to Set
398398+ pub struct SetList<S: State = Empty>(PhantomData<fn() -> S>);
399399+ impl<S: State> sealed::Sealed for SetList<S> {}
400400+ impl<S: State> State for SetList<S> {
401401+ type Name = S::Name;
402402+ type CreatedAt = S::CreatedAt;
403403+ type List = Set<members::list>;
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(());
410410+ ///Marker type for the `created_at` field
411411+ pub struct created_at(());
410412 ///Marker type for the `list` field
411413 pub struct list(());
412412- ///Marker type for the `created_at` field
413413- pub struct created_at(());
414414 }
415415}
416416···564564where
565565 S: starterpack_state::State,
566566 S::Name: starterpack_state::IsSet,
567567- S::List: starterpack_state::IsSet,
568567 S::CreatedAt: starterpack_state::IsSet,
568568+ S::List: starterpack_state::IsSet,
569569{
570570 /// Build the final struct
571571 pub fn build(self) -> Starterpack<'a> {
···4343 pub trait State: sealed::Sealed {
4444 type Handle;
4545 type DisplayName;
4646- type Subject;
4746 type CreatedAt;
4747+ type Subject;
4848 }
4949 /// Empty state - all required fields are unset
5050 pub struct Empty(());
···5252 impl State for Empty {
5353 type Handle = Unset;
5454 type DisplayName = Unset;
5555- type Subject = Unset;
5655 type CreatedAt = Unset;
5656+ type Subject = Unset;
5757 }
5858 ///State transition - sets the `handle` field to Set
5959 pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
···6161 impl<S: State> State for SetHandle<S> {
6262 type Handle = Set<members::handle>;
6363 type DisplayName = S::DisplayName;
6464- type Subject = S::Subject;
6564 type CreatedAt = S::CreatedAt;
6565+ type Subject = S::Subject;
6666 }
6767 ///State transition - sets the `display_name` field to Set
6868 pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>);
···7070 impl<S: State> State for SetDisplayName<S> {
7171 type Handle = S::Handle;
7272 type DisplayName = Set<members::display_name>;
7373- type Subject = S::Subject;
7474- type CreatedAt = S::CreatedAt;
7575- }
7676- ///State transition - sets the `subject` field to Set
7777- pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
7878- impl<S: State> sealed::Sealed for SetSubject<S> {}
7979- impl<S: State> State for SetSubject<S> {
8080- type Handle = S::Handle;
8181- type DisplayName = S::DisplayName;
8282- type Subject = Set<members::subject>;
8373 type CreatedAt = S::CreatedAt;
7474+ type Subject = S::Subject;
8475 }
8576 ///State transition - sets the `created_at` field to Set
8677 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
···8879 impl<S: State> State for SetCreatedAt<S> {
8980 type Handle = S::Handle;
9081 type DisplayName = S::DisplayName;
9191- type Subject = S::Subject;
9282 type CreatedAt = Set<members::created_at>;
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 Handle = S::Handle;
9090+ type DisplayName = S::DisplayName;
9191+ type CreatedAt = S::CreatedAt;
9292+ type Subject = Set<members::subject>;
9393 }
9494 /// Marker types for field names
9595 #[allow(non_camel_case_types)]
···9898 pub struct handle(());
9999 ///Marker type for the `display_name` field
100100 pub struct display_name(());
101101+ ///Marker type for the `created_at` field
102102+ pub struct created_at(());
101103 ///Marker type for the `subject` field
102104 pub struct subject(());
103103- ///Marker type for the `created_at` field
104104- pub struct created_at(());
105105 }
106106}
107107···216216 S: verification_state::State,
217217 S::Handle: verification_state::IsSet,
218218 S::DisplayName: verification_state::IsSet,
219219- S::Subject: verification_state::IsSet,
220219 S::CreatedAt: verification_state::IsSet,
220220+ S::Subject: verification_state::IsSet,
221221{
222222 /// Build the final struct
223223 pub fn build(self) -> Verification<'a> {
+36-36
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 Creator;
636637 type Uri;
637638 type Cid;
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 Creator = Unset;
645646 type Uri = Unset;
646647 type Cid = 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 Creator = S::Creator;
655655+ type Uri = S::Uri;
656656+ type Cid = S::Cid;
648657 }
649658 ///State transition - sets the `creator` field to Set
650659 pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
651660 impl<S: State> sealed::Sealed for SetCreator<S> {}
652661 impl<S: State> State for SetCreator<S> {
662662+ type IndexedAt = S::IndexedAt;
653663 type Creator = Set<members::creator>;
654664 type Uri = S::Uri;
655665 type Cid = S::Cid;
656656- type IndexedAt = S::IndexedAt;
657666 }
658667 ///State transition - sets the `uri` field to Set
659668 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
660669 impl<S: State> sealed::Sealed for SetUri<S> {}
661670 impl<S: State> State for SetUri<S> {
671671+ type IndexedAt = S::IndexedAt;
662672 type Creator = S::Creator;
663673 type Uri = Set<members::uri>;
664674 type Cid = S::Cid;
665665- type IndexedAt = S::IndexedAt;
666675 }
667676 ///State transition - sets the `cid` field to Set
668677 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
669678 impl<S: State> sealed::Sealed for SetCid<S> {}
670679 impl<S: State> State for SetCid<S> {
671671- type Creator = S::Creator;
672672- type Uri = S::Uri;
673673- type Cid = Set<members::cid>;
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 Creator = S::Creator;
681682 type Uri = S::Uri;
682682- type Cid = S::Cid;
683683- type IndexedAt = Set<members::indexed_at>;
683683+ type Cid = Set<members::cid>;
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 `creator` field
689691 pub struct creator(());
690692 ///Marker type for the `uri` field
691693 pub struct uri(());
692694 ///Marker type for the `cid` field
693695 pub struct cid(());
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::Creator: labeler_view_state::IsSet,
863864 S::Uri: labeler_view_state::IsSet,
864865 S::Cid: labeler_view_state::IsSet,
865865- S::IndexedAt: labeler_view_state::IsSet,
866866{
867867 /// Build the final struct
868868 pub fn build(self) -> LabelerView<'a> {
···988988 type Uri;
989989 type Policies;
990990 type IndexedAt;
991991- type Creator;
992991 type Cid;
992992+ type Creator;
993993 }
994994 /// Empty state - all required fields are unset
995995 pub struct Empty(());
···998998 type Uri = Unset;
999999 type Policies = Unset;
10001000 type IndexedAt = Unset;
10011001- type Creator = Unset;
10021001 type Cid = Unset;
10021002+ type Creator = Unset;
10031003 }
10041004 ///State transition - sets the `uri` field to Set
10051005 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
···10081008 type Uri = Set<members::uri>;
10091009 type Policies = S::Policies;
10101010 type IndexedAt = S::IndexedAt;
10111011+ type Cid = S::Cid;
10111012 type Creator = S::Creator;
10121012- type Cid = S::Cid;
10131013 }
10141014 ///State transition - sets the `policies` field to Set
10151015 pub struct SetPolicies<S: State = Empty>(PhantomData<fn() -> S>);
···10181018 type Uri = S::Uri;
10191019 type Policies = Set<members::policies>;
10201020 type IndexedAt = S::IndexedAt;
10211021+ type Cid = S::Cid;
10211022 type Creator = S::Creator;
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>);
···10281028 type Uri = S::Uri;
10291029 type Policies = S::Policies;
10301030 type IndexedAt = Set<members::indexed_at>;
10311031- type Creator = S::Creator;
10321032- type Cid = S::Cid;
10331033- }
10341034- ///State transition - sets the `creator` field to Set
10351035- pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
10361036- impl<S: State> sealed::Sealed for SetCreator<S> {}
10371037- impl<S: State> State for SetCreator<S> {
10381038- type Uri = S::Uri;
10391039- type Policies = S::Policies;
10401040- type IndexedAt = S::IndexedAt;
10411041- type Creator = Set<members::creator>;
10421031 type Cid = S::Cid;
10321032+ type Creator = S::Creator;
10431033 }
10441034 ///State transition - sets the `cid` field to Set
10451035 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
···10481038 type Uri = S::Uri;
10491039 type Policies = S::Policies;
10501040 type IndexedAt = S::IndexedAt;
10411041+ type Cid = Set<members::cid>;
10511042 type Creator = S::Creator;
10521052- type Cid = Set<members::cid>;
10431043+ }
10441044+ ///State transition - sets the `creator` field to Set
10451045+ pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
10461046+ impl<S: State> sealed::Sealed for SetCreator<S> {}
10471047+ impl<S: State> State for SetCreator<S> {
10481048+ type Uri = S::Uri;
10491049+ type Policies = S::Policies;
10501050+ type IndexedAt = S::IndexedAt;
10511051+ type Cid = S::Cid;
10521052+ type Creator = Set<members::creator>;
10531053 }
10541054 /// Marker types for field names
10551055 #[allow(non_camel_case_types)]
···10601060 pub struct policies(());
10611061 ///Marker type for the `indexed_at` field
10621062 pub struct indexed_at(());
10631063+ ///Marker type for the `cid` field
10641064+ pub struct cid(());
10631065 ///Marker type for the `creator` field
10641066 pub struct creator(());
10651065- ///Marker type for the `cid` field
10661066- pub struct cid(());
10671067 }
10681068}
10691069···13251325 S::Uri: labeler_view_detailed_state::IsSet,
13261326 S::Policies: labeler_view_detailed_state::IsSet,
13271327 S::IndexedAt: labeler_view_detailed_state::IsSet,
13281328- S::Creator: labeler_view_detailed_state::IsSet,
13291328 S::Cid: labeler_view_detailed_state::IsSet,
13291329+ S::Creator: labeler_view_detailed_state::IsSet,
13301330{
13311331 /// Build the final struct
13321332 pub fn build(self) -> LabelerViewDetailed<'a> {
+193-193
crates/weaver-api/src/app_bsky/notification.rs
···4343 }
4444 /// State trait tracking which required fields have been set
4545 pub trait State: sealed::Sealed {
4646- type Reply;
4746 type Post;
4747+ type Reply;
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 Reply = Unset;
5453 type Post = Unset;
5555- }
5656- ///State transition - sets the `reply` field to Set
5757- pub struct SetReply<S: State = Empty>(PhantomData<fn() -> S>);
5858- impl<S: State> sealed::Sealed for SetReply<S> {}
5959- impl<S: State> State for SetReply<S> {
6060- type Reply = Set<members::reply>;
6161- type Post = S::Post;
5454+ type Reply = Unset;
6255 }
6356 ///State transition - sets the `post` field to Set
6457 pub struct SetPost<S: State = Empty>(PhantomData<fn() -> S>);
6558 impl<S: State> sealed::Sealed for SetPost<S> {}
6659 impl<S: State> State for SetPost<S> {
6767- type Reply = S::Reply;
6860 type Post = Set<members::post>;
6161+ type Reply = S::Reply;
6262+ }
6363+ ///State transition - sets the `reply` field to Set
6464+ pub struct SetReply<S: State = Empty>(PhantomData<fn() -> S>);
6565+ impl<S: State> sealed::Sealed for SetReply<S> {}
6666+ impl<S: State> State for SetReply<S> {
6767+ type Post = S::Post;
6868+ type Reply = Set<members::reply>;
6969 }
7070 /// Marker types for field names
7171 #[allow(non_camel_case_types)]
7272 pub mod members {
7373- ///Marker type for the `reply` field
7474- pub struct reply(());
7573 ///Marker type for the `post` field
7674 pub struct post(());
7575+ ///Marker type for the `reply` field
7676+ pub struct reply(());
7777 }
7878}
7979···143143impl<'a, S> ActivitySubscriptionBuilder<'a, S>
144144where
145145 S: activity_subscription_state::State,
146146- S::Reply: activity_subscription_state::IsSet,
147146 S::Post: activity_subscription_state::IsSet,
147147+ S::Reply: activity_subscription_state::IsSet,
148148{
149149 /// Build the final struct
150150 pub fn build(self) -> ActivitySubscription<'a> {
···601601 }
602602 /// State trait tracking which required fields have been set
603603 pub trait State: sealed::Sealed {
604604- type Push;
605604 type Include;
605605+ type Push;
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 Push = Unset;
612611 type Include = Unset;
612612+ type Push = Unset;
613613+ }
614614+ ///State transition - sets the `include` field to Set
615615+ pub struct SetInclude<S: State = Empty>(PhantomData<fn() -> S>);
616616+ impl<S: State> sealed::Sealed for SetInclude<S> {}
617617+ impl<S: State> State for SetInclude<S> {
618618+ type Include = Set<members::include>;
619619+ type Push = S::Push;
613620 }
614621 ///State transition - sets the `push` field to Set
615622 pub struct SetPush<S: State = Empty>(PhantomData<fn() -> S>);
616623 impl<S: State> sealed::Sealed for SetPush<S> {}
617624 impl<S: State> State for SetPush<S> {
625625+ type Include = S::Include;
618626 type Push = Set<members::push>;
619619- type Include = S::Include;
620620- }
621621- ///State transition - sets the `include` field to Set
622622- pub struct SetInclude<S: State = Empty>(PhantomData<fn() -> S>);
623623- impl<S: State> sealed::Sealed for SetInclude<S> {}
624624- impl<S: State> State for SetInclude<S> {
625625- type Push = S::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 `include` field
632632+ pub struct include(());
631633 ///Marker type for the `push` field
632634 pub struct push(());
633633- ///Marker type for the `include` field
634634- pub struct include(());
635635 }
636636}
637637···704704impl<'a, S> ChatPreferenceBuilder<'a, S>
705705where
706706 S: chat_preference_state::State,
707707- S::Push: chat_preference_state::IsSet,
708707 S::Include: chat_preference_state::IsSet,
708708+ S::Push: chat_preference_state::IsSet,
709709{
710710 /// Build the final struct
711711 pub fn build(self) -> ChatPreference<'a> {
···13601360 }
13611361 /// State trait tracking which required fields have been set
13621362 pub trait State: sealed::Sealed {
13631363+ type StarterpackJoined;
13641364+ type RepostViaRepost;
13631365 type SubscribedPost;
13641364- type RepostViaRepost;
13651366 type Unverified;
13671367+ type Follow;
13661368 type Verified;
13671367- type Like;
13681368- type Repost;
13691369 type Quote;
13701370+ type Like;
13711371+ type LikeViaRepost;
13721372+ type Chat;
13701373 type Mention;
13711371- type StarterpackJoined;
13721372- type Follow;
13731374 type Reply;
13741374- type Chat;
13751375- type LikeViaRepost;
13751375+ type Repost;
13761376 }
13771377 /// Empty state - all required fields are unset
13781378 pub struct Empty(());
13791379 impl sealed::Sealed for Empty {}
13801380 impl State for Empty {
13811381- type SubscribedPost = Unset;
13811381+ type StarterpackJoined = Unset;
13821382 type RepostViaRepost = Unset;
13831383+ type SubscribedPost = Unset;
13831384 type Unverified = Unset;
13851385+ type Follow = Unset;
13841386 type Verified = Unset;
13871387+ type Quote = Unset;
13851388 type Like = Unset;
13861386- type Repost = Unset;
13871387- type Quote = Unset;
13891389+ type LikeViaRepost = Unset;
13901390+ type Chat = Unset;
13881391 type Mention = Unset;
13891389- type StarterpackJoined = Unset;
13901390- type Follow = Unset;
13911392 type Reply = Unset;
13921392- type Chat = Unset;
13931393- type LikeViaRepost = Unset;
13931393+ type Repost = Unset;
13941394 }
13951395- ///State transition - sets the `subscribed_post` field to Set
13961396- pub struct SetSubscribedPost<S: State = Empty>(PhantomData<fn() -> S>);
13971397- impl<S: State> sealed::Sealed for SetSubscribedPost<S> {}
13981398- impl<S: State> State for SetSubscribedPost<S> {
13991399- type SubscribedPost = Set<members::subscribed_post>;
13951395+ ///State transition - sets the `starterpack_joined` field to Set
13961396+ pub struct SetStarterpackJoined<S: State = Empty>(PhantomData<fn() -> S>);
13971397+ impl<S: State> sealed::Sealed for SetStarterpackJoined<S> {}
13981398+ impl<S: State> State for SetStarterpackJoined<S> {
13991399+ type StarterpackJoined = Set<members::starterpack_joined>;
14001400 type RepostViaRepost = S::RepostViaRepost;
14011401+ type SubscribedPost = S::SubscribedPost;
14011402 type Unverified = S::Unverified;
14031403+ type Follow = S::Follow;
14021404 type Verified = S::Verified;
14051405+ type Quote = S::Quote;
14031406 type Like = S::Like;
14041404- type Repost = S::Repost;
14051405- type Quote = S::Quote;
14071407+ type LikeViaRepost = S::LikeViaRepost;
14081408+ type Chat = S::Chat;
14061409 type Mention = S::Mention;
14071407- type StarterpackJoined = S::StarterpackJoined;
14081408- type Follow = S::Follow;
14091410 type Reply = S::Reply;
14101410- type Chat = S::Chat;
14111411- type LikeViaRepost = S::LikeViaRepost;
14111411+ type Repost = S::Repost;
14121412 }
14131413 ///State transition - sets the `repost_via_repost` field to Set
14141414 pub struct SetRepostViaRepost<S: State = Empty>(PhantomData<fn() -> S>);
14151415 impl<S: State> sealed::Sealed for SetRepostViaRepost<S> {}
14161416 impl<S: State> State for SetRepostViaRepost<S> {
14171417- type SubscribedPost = S::SubscribedPost;
14171417+ type StarterpackJoined = S::StarterpackJoined;
14181418 type RepostViaRepost = Set<members::repost_via_repost>;
14191419+ type SubscribedPost = S::SubscribedPost;
14191420 type Unverified = S::Unverified;
14211421+ type Follow = S::Follow;
14201422 type Verified = S::Verified;
14231423+ type Quote = S::Quote;
14211424 type Like = S::Like;
14221422- type Repost = S::Repost;
14231423- type Quote = S::Quote;
14251425+ type LikeViaRepost = S::LikeViaRepost;
14261426+ type Chat = S::Chat;
14241427 type Mention = S::Mention;
14281428+ type Reply = S::Reply;
14291429+ type Repost = S::Repost;
14301430+ }
14311431+ ///State transition - sets the `subscribed_post` field to Set
14321432+ pub struct SetSubscribedPost<S: State = Empty>(PhantomData<fn() -> S>);
14331433+ impl<S: State> sealed::Sealed for SetSubscribedPost<S> {}
14341434+ impl<S: State> State for SetSubscribedPost<S> {
14251435 type StarterpackJoined = S::StarterpackJoined;
14361436+ type RepostViaRepost = S::RepostViaRepost;
14371437+ type SubscribedPost = Set<members::subscribed_post>;
14381438+ type Unverified = S::Unverified;
14261439 type Follow = S::Follow;
14271427- type Reply = S::Reply;
14281428- type Chat = S::Chat;
14401440+ type Verified = S::Verified;
14411441+ type Quote = S::Quote;
14421442+ type Like = S::Like;
14291443 type LikeViaRepost = S::LikeViaRepost;
14441444+ type Chat = S::Chat;
14451445+ type Mention = S::Mention;
14461446+ type Reply = S::Reply;
14471447+ type Repost = S::Repost;
14301448 }
14311449 ///State transition - sets the `unverified` field to Set
14321450 pub struct SetUnverified<S: State = Empty>(PhantomData<fn() -> S>);
14331451 impl<S: State> sealed::Sealed for SetUnverified<S> {}
14341452 impl<S: State> State for SetUnverified<S> {
14531453+ type StarterpackJoined = S::StarterpackJoined;
14541454+ type RepostViaRepost = S::RepostViaRepost;
14351455 type SubscribedPost = S::SubscribedPost;
14361436- type RepostViaRepost = S::RepostViaRepost;
14371456 type Unverified = Set<members::unverified>;
14571457+ type Follow = S::Follow;
14381458 type Verified = S::Verified;
14591459+ type Quote = S::Quote;
14391460 type Like = S::Like;
14611461+ type LikeViaRepost = S::LikeViaRepost;
14621462+ type Chat = S::Chat;
14631463+ type Mention = S::Mention;
14641464+ type Reply = S::Reply;
14401465 type Repost = S::Repost;
14661466+ }
14671467+ ///State transition - sets the `follow` field to Set
14681468+ pub struct SetFollow<S: State = Empty>(PhantomData<fn() -> S>);
14691469+ impl<S: State> sealed::Sealed for SetFollow<S> {}
14701470+ impl<S: State> State for SetFollow<S> {
14711471+ type StarterpackJoined = S::StarterpackJoined;
14721472+ type RepostViaRepost = S::RepostViaRepost;
14731473+ type SubscribedPost = S::SubscribedPost;
14741474+ type Unverified = S::Unverified;
14751475+ type Follow = Set<members::follow>;
14761476+ type Verified = S::Verified;
14411477 type Quote = S::Quote;
14781478+ type Like = S::Like;
14791479+ type LikeViaRepost = S::LikeViaRepost;
14801480+ type Chat = S::Chat;
14421481 type Mention = S::Mention;
14431443- type StarterpackJoined = S::StarterpackJoined;
14441444- type Follow = S::Follow;
14451482 type Reply = S::Reply;
14461446- type Chat = S::Chat;
14471447- type LikeViaRepost = S::LikeViaRepost;
14831483+ type Repost = S::Repost;
14481484 }
14491485 ///State transition - sets the `verified` field to Set
14501486 pub struct SetVerified<S: State = Empty>(PhantomData<fn() -> S>);
14511487 impl<S: State> sealed::Sealed for SetVerified<S> {}
14521488 impl<S: State> State for SetVerified<S> {
14531453- type SubscribedPost = S::SubscribedPost;
14891489+ type StarterpackJoined = S::StarterpackJoined;
14541490 type RepostViaRepost = S::RepostViaRepost;
14911491+ type SubscribedPost = S::SubscribedPost;
14551492 type Unverified = S::Unverified;
14931493+ type Follow = S::Follow;
14561494 type Verified = Set<members::verified>;
14571457- type Like = S::Like;
14581458- type Repost = S::Repost;
14591495 type Quote = S::Quote;
14961496+ type Like = S::Like;
14971497+ type LikeViaRepost = S::LikeViaRepost;
14981498+ type Chat = S::Chat;
14601499 type Mention = S::Mention;
15001500+ type Reply = S::Reply;
15011501+ type Repost = S::Repost;
15021502+ }
15031503+ ///State transition - sets the `quote` field to Set
15041504+ pub struct SetQuote<S: State = Empty>(PhantomData<fn() -> S>);
15051505+ impl<S: State> sealed::Sealed for SetQuote<S> {}
15061506+ impl<S: State> State for SetQuote<S> {
14611507 type StarterpackJoined = S::StarterpackJoined;
15081508+ type RepostViaRepost = S::RepostViaRepost;
15091509+ type SubscribedPost = S::SubscribedPost;
15101510+ type Unverified = S::Unverified;
14621511 type Follow = S::Follow;
14631463- type Reply = S::Reply;
14641464- type Chat = S::Chat;
15121512+ type Verified = S::Verified;
15131513+ type Quote = Set<members::quote>;
15141514+ type Like = S::Like;
14651515 type LikeViaRepost = S::LikeViaRepost;
15161516+ type Chat = S::Chat;
15171517+ type Mention = S::Mention;
15181518+ type Reply = S::Reply;
15191519+ type Repost = S::Repost;
14661520 }
14671521 ///State transition - sets the `like` field to Set
14681522 pub struct SetLike<S: State = Empty>(PhantomData<fn() -> S>);
14691523 impl<S: State> sealed::Sealed for SetLike<S> {}
14701524 impl<S: State> State for SetLike<S> {
14711471- type SubscribedPost = S::SubscribedPost;
15251525+ type StarterpackJoined = S::StarterpackJoined;
14721526 type RepostViaRepost = S::RepostViaRepost;
15271527+ type SubscribedPost = S::SubscribedPost;
14731528 type Unverified = S::Unverified;
15291529+ type Follow = S::Follow;
14741530 type Verified = S::Verified;
15311531+ type Quote = S::Quote;
14751532 type Like = Set<members::like>;
14761476- type Repost = S::Repost;
14771477- type Quote = S::Quote;
15331533+ type LikeViaRepost = S::LikeViaRepost;
15341534+ type Chat = S::Chat;
14781535 type Mention = S::Mention;
14791479- type StarterpackJoined = S::StarterpackJoined;
14801480- type Follow = S::Follow;
14811536 type Reply = S::Reply;
14821482- type Chat = S::Chat;
14831483- type LikeViaRepost = S::LikeViaRepost;
15371537+ type Repost = S::Repost;
14841538 }
14851485- ///State transition - sets the `repost` field to Set
14861486- pub struct SetRepost<S: State = Empty>(PhantomData<fn() -> S>);
14871487- impl<S: State> sealed::Sealed for SetRepost<S> {}
14881488- impl<S: State> State for SetRepost<S> {
15391539+ ///State transition - sets the `like_via_repost` field to Set
15401540+ pub struct SetLikeViaRepost<S: State = Empty>(PhantomData<fn() -> S>);
15411541+ impl<S: State> sealed::Sealed for SetLikeViaRepost<S> {}
15421542+ impl<S: State> State for SetLikeViaRepost<S> {
15431543+ type StarterpackJoined = S::StarterpackJoined;
15441544+ type RepostViaRepost = S::RepostViaRepost;
14891545 type SubscribedPost = S::SubscribedPost;
14901490- type RepostViaRepost = S::RepostViaRepost;
14911546 type Unverified = S::Unverified;
15471547+ type Follow = S::Follow;
14921548 type Verified = S::Verified;
15491549+ type Quote = S::Quote;
14931550 type Like = S::Like;
14941494- type Repost = Set<members::repost>;
14951495- type Quote = S::Quote;
15511551+ type LikeViaRepost = Set<members::like_via_repost>;
15521552+ type Chat = S::Chat;
14961553 type Mention = S::Mention;
14971497- type StarterpackJoined = S::StarterpackJoined;
14981498- type Follow = S::Follow;
14991554 type Reply = S::Reply;
15001500- type Chat = S::Chat;
15011501- type LikeViaRepost = S::LikeViaRepost;
15551555+ type Repost = S::Repost;
15021556 }
15031503- ///State transition - sets the `quote` field to Set
15041504- pub struct SetQuote<S: State = Empty>(PhantomData<fn() -> S>);
15051505- impl<S: State> sealed::Sealed for SetQuote<S> {}
15061506- impl<S: State> State for SetQuote<S> {
15071507- type SubscribedPost = S::SubscribedPost;
15571557+ ///State transition - sets the `chat` field to Set
15581558+ pub struct SetChat<S: State = Empty>(PhantomData<fn() -> S>);
15591559+ impl<S: State> sealed::Sealed for SetChat<S> {}
15601560+ impl<S: State> State for SetChat<S> {
15611561+ type StarterpackJoined = S::StarterpackJoined;
15081562 type RepostViaRepost = S::RepostViaRepost;
15631563+ type SubscribedPost = S::SubscribedPost;
15091564 type Unverified = S::Unverified;
15651565+ type Follow = S::Follow;
15101566 type Verified = S::Verified;
15671567+ type Quote = S::Quote;
15111568 type Like = S::Like;
15121512- type Repost = S::Repost;
15131513- type Quote = Set<members::quote>;
15691569+ type LikeViaRepost = S::LikeViaRepost;
15701570+ type Chat = Set<members::chat>;
15141571 type Mention = S::Mention;
15151515- type StarterpackJoined = S::StarterpackJoined;
15161516- type Follow = S::Follow;
15171572 type Reply = S::Reply;
15181518- type Chat = S::Chat;
15191519- type LikeViaRepost = S::LikeViaRepost;
15731573+ type Repost = S::Repost;
15201574 }
15211575 ///State transition - sets the `mention` field to Set
15221576 pub struct SetMention<S: State = Empty>(PhantomData<fn() -> S>);
15231577 impl<S: State> sealed::Sealed for SetMention<S> {}
15241578 impl<S: State> State for SetMention<S> {
15791579+ type StarterpackJoined = S::StarterpackJoined;
15801580+ type RepostViaRepost = S::RepostViaRepost;
15251581 type SubscribedPost = S::SubscribedPost;
15261526- type RepostViaRepost = S::RepostViaRepost;
15271582 type Unverified = S::Unverified;
15831583+ type Follow = S::Follow;
15281584 type Verified = S::Verified;
15851585+ type Quote = S::Quote;
15291586 type Like = S::Like;
15301530- type Repost = S::Repost;
15311531- type Quote = S::Quote;
15871587+ type LikeViaRepost = S::LikeViaRepost;
15881588+ type Chat = S::Chat;
15321589 type Mention = Set<members::mention>;
15331533- type StarterpackJoined = S::StarterpackJoined;
15341534- type Follow = S::Follow;
15351590 type Reply = S::Reply;
15361536- type Chat = S::Chat;
15371537- type LikeViaRepost = S::LikeViaRepost;
15381538- }
15391539- ///State transition - sets the `starterpack_joined` field to Set
15401540- pub struct SetStarterpackJoined<S: State = Empty>(PhantomData<fn() -> S>);
15411541- impl<S: State> sealed::Sealed for SetStarterpackJoined<S> {}
15421542- impl<S: State> State for SetStarterpackJoined<S> {
15431543- type SubscribedPost = S::SubscribedPost;
15441544- type RepostViaRepost = S::RepostViaRepost;
15451545- type Unverified = S::Unverified;
15461546- type Verified = S::Verified;
15471547- type Like = S::Like;
15481591 type Repost = S::Repost;
15491549- type Quote = S::Quote;
15501550- type Mention = S::Mention;
15511551- type StarterpackJoined = Set<members::starterpack_joined>;
15521552- type Follow = S::Follow;
15531553- type Reply = S::Reply;
15541554- type Chat = S::Chat;
15551555- type LikeViaRepost = S::LikeViaRepost;
15561556- }
15571557- ///State transition - sets the `follow` field to Set
15581558- pub struct SetFollow<S: State = Empty>(PhantomData<fn() -> S>);
15591559- impl<S: State> sealed::Sealed for SetFollow<S> {}
15601560- impl<S: State> State for SetFollow<S> {
15611561- type SubscribedPost = S::SubscribedPost;
15621562- type RepostViaRepost = S::RepostViaRepost;
15631563- type Unverified = S::Unverified;
15641564- type Verified = S::Verified;
15651565- type Like = S::Like;
15661566- type Repost = S::Repost;
15671567- type Quote = S::Quote;
15681568- type Mention = S::Mention;
15691569- type StarterpackJoined = S::StarterpackJoined;
15701570- type Follow = Set<members::follow>;
15711571- type Reply = S::Reply;
15721572- type Chat = S::Chat;
15731573- type LikeViaRepost = S::LikeViaRepost;
15741592 }
15751593 ///State transition - sets the `reply` field to Set
15761594 pub struct SetReply<S: State = Empty>(PhantomData<fn() -> S>);
15771595 impl<S: State> sealed::Sealed for SetReply<S> {}
15781596 impl<S: State> State for SetReply<S> {
15971597+ type StarterpackJoined = S::StarterpackJoined;
15981598+ type RepostViaRepost = S::RepostViaRepost;
15791599 type SubscribedPost = S::SubscribedPost;
15801580- type RepostViaRepost = S::RepostViaRepost;
15811600 type Unverified = S::Unverified;
16011601+ type Follow = S::Follow;
15821602 type Verified = S::Verified;
15831583- type Like = S::Like;
15841584- type Repost = S::Repost;
15851603 type Quote = S::Quote;
16041604+ type Like = S::Like;
16051605+ type LikeViaRepost = S::LikeViaRepost;
16061606+ type Chat = S::Chat;
15861607 type Mention = S::Mention;
15871587- type StarterpackJoined = S::StarterpackJoined;
15881588- type Follow = S::Follow;
15891608 type Reply = Set<members::reply>;
15901590- type Chat = S::Chat;
15911591- type LikeViaRepost = S::LikeViaRepost;
16091609+ type Repost = S::Repost;
15921610 }
15931593- ///State transition - sets the `chat` field to Set
15941594- pub struct SetChat<S: State = Empty>(PhantomData<fn() -> S>);
15951595- impl<S: State> sealed::Sealed for SetChat<S> {}
15961596- impl<S: State> State for SetChat<S> {
16111611+ ///State transition - sets the `repost` field to Set
16121612+ pub struct SetRepost<S: State = Empty>(PhantomData<fn() -> S>);
16131613+ impl<S: State> sealed::Sealed for SetRepost<S> {}
16141614+ impl<S: State> State for SetRepost<S> {
16151615+ type StarterpackJoined = S::StarterpackJoined;
16161616+ type RepostViaRepost = S::RepostViaRepost;
15971617 type SubscribedPost = S::SubscribedPost;
15981598- type RepostViaRepost = S::RepostViaRepost;
15991618 type Unverified = S::Unverified;
16191619+ type Follow = S::Follow;
16001620 type Verified = S::Verified;
16011601- type Like = S::Like;
16021602- type Repost = S::Repost;
16031621 type Quote = S::Quote;
16041604- type Mention = S::Mention;
16051605- type StarterpackJoined = S::StarterpackJoined;
16061606- type Follow = S::Follow;
16071607- type Reply = S::Reply;
16081608- type Chat = Set<members::chat>;
16221622+ type Like = S::Like;
16091623 type LikeViaRepost = S::LikeViaRepost;
16101610- }
16111611- ///State transition - sets the `like_via_repost` field to Set
16121612- pub struct SetLikeViaRepost<S: State = Empty>(PhantomData<fn() -> S>);
16131613- impl<S: State> sealed::Sealed for SetLikeViaRepost<S> {}
16141614- impl<S: State> State for SetLikeViaRepost<S> {
16151615- type SubscribedPost = S::SubscribedPost;
16161616- type RepostViaRepost = S::RepostViaRepost;
16171617- type Unverified = S::Unverified;
16181618- type Verified = S::Verified;
16191619- type Like = S::Like;
16201620- type Repost = S::Repost;
16211621- type Quote = S::Quote;
16241624+ type Chat = S::Chat;
16221625 type Mention = S::Mention;
16231623- type StarterpackJoined = S::StarterpackJoined;
16241624- type Follow = S::Follow;
16251626 type Reply = S::Reply;
16261626- type Chat = S::Chat;
16271627- type LikeViaRepost = Set<members::like_via_repost>;
16271627+ type Repost = Set<members::repost>;
16281628 }
16291629 /// Marker types for field names
16301630 #[allow(non_camel_case_types)]
16311631 pub mod members {
16321632+ ///Marker type for the `starterpack_joined` field
16331633+ pub struct starterpack_joined(());
16341634+ ///Marker type for the `repost_via_repost` field
16351635+ pub struct repost_via_repost(());
16321636 ///Marker type for the `subscribed_post` field
16331637 pub struct subscribed_post(());
16341634- ///Marker type for the `repost_via_repost` field
16351635- pub struct repost_via_repost(());
16361638 ///Marker type for the `unverified` field
16371639 pub struct unverified(());
16401640+ ///Marker type for the `follow` field
16411641+ pub struct follow(());
16381642 ///Marker type for the `verified` field
16391643 pub struct verified(());
16441644+ ///Marker type for the `quote` field
16451645+ pub struct quote(());
16401646 ///Marker type for the `like` field
16411647 pub struct like(());
16421642- ///Marker type for the `repost` field
16431643- pub struct repost(());
16441644- ///Marker type for the `quote` field
16451645- pub struct quote(());
16481648+ ///Marker type for the `like_via_repost` field
16491649+ pub struct like_via_repost(());
16501650+ ///Marker type for the `chat` field
16511651+ pub struct chat(());
16461652 ///Marker type for the `mention` field
16471653 pub struct mention(());
16481648- ///Marker type for the `starterpack_joined` field
16491649- pub struct starterpack_joined(());
16501650- ///Marker type for the `follow` field
16511651- pub struct follow(());
16521654 ///Marker type for the `reply` field
16531655 pub struct reply(());
16541654- ///Marker type for the `chat` field
16551655- pub struct chat(());
16561656- ///Marker type for the `like_via_repost` field
16571657- pub struct like_via_repost(());
16561656+ ///Marker type for the `repost` field
16571657+ pub struct repost(());
16581658 }
16591659}
16601660···19611961impl<'a, S> PreferencesBuilder<'a, S>
19621962where
19631963 S: preferences_state::State,
19641964- S::SubscribedPost: preferences_state::IsSet,
19641964+ S::StarterpackJoined: preferences_state::IsSet,
19651965 S::RepostViaRepost: preferences_state::IsSet,
19661966+ S::SubscribedPost: preferences_state::IsSet,
19661967 S::Unverified: preferences_state::IsSet,
19681968+ S::Follow: preferences_state::IsSet,
19671969 S::Verified: preferences_state::IsSet,
19701970+ S::Quote: preferences_state::IsSet,
19681971 S::Like: preferences_state::IsSet,
19691969- S::Repost: preferences_state::IsSet,
19701970- S::Quote: preferences_state::IsSet,
19721972+ S::LikeViaRepost: preferences_state::IsSet,
19731973+ S::Chat: preferences_state::IsSet,
19711974 S::Mention: preferences_state::IsSet,
19721972- S::StarterpackJoined: preferences_state::IsSet,
19731973- S::Follow: preferences_state::IsSet,
19741975 S::Reply: preferences_state::IsSet,
19751975- S::Chat: preferences_state::IsSet,
19761976- S::LikeViaRepost: preferences_state::IsSet,
19761976+ S::Repost: preferences_state::IsSet,
19771977{
19781978 /// Build the final struct
19791979 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 Cid;
275275- type Author;
276276- type Record;
277277- type IsRead;
278274 type Reason;
279279- type Uri;
275275+ type IsRead;
276276+ type Author;
280277 type IndexedAt;
278278+ type Uri;
279279+ type Cid;
280280+ type Record;
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 Reason = Unset;
287287+ type IsRead = Unset;
288288+ type Author = Unset;
289289+ type IndexedAt = Unset;
290290+ type Uri = Unset;
286291 type Cid = Unset;
287287- type Author = Unset;
288292 type Record = Unset;
289289- type IsRead = Unset;
290290- type Reason = Unset;
291291- type Uri = Unset;
292292- type IndexedAt = Unset;
293293 }
294294- ///State transition - sets the `cid` field to Set
295295- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
296296- impl<S: State> sealed::Sealed for SetCid<S> {}
297297- impl<S: State> State for SetCid<S> {
298298- type Cid = Set<members::cid>;
294294+ ///State transition - sets the `reason` field to Set
295295+ pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
296296+ impl<S: State> sealed::Sealed for SetReason<S> {}
297297+ impl<S: State> State for SetReason<S> {
298298+ type Reason = Set<members::reason>;
299299+ type IsRead = S::IsRead;
299300 type Author = S::Author;
301301+ type IndexedAt = S::IndexedAt;
302302+ type Uri = S::Uri;
303303+ type Cid = S::Cid;
300304 type Record = S::Record;
301301- type IsRead = S::IsRead;
305305+ }
306306+ ///State transition - sets the `is_read` field to Set
307307+ pub struct SetIsRead<S: State = Empty>(PhantomData<fn() -> S>);
308308+ impl<S: State> sealed::Sealed for SetIsRead<S> {}
309309+ impl<S: State> State for SetIsRead<S> {
302310 type Reason = S::Reason;
303303- type Uri = S::Uri;
311311+ type IsRead = Set<members::is_read>;
312312+ type Author = S::Author;
304313 type IndexedAt = S::IndexedAt;
314314+ type Uri = S::Uri;
315315+ type Cid = S::Cid;
316316+ type Record = S::Record;
305317 }
306318 ///State transition - sets the `author` field to Set
307319 pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
308320 impl<S: State> sealed::Sealed for SetAuthor<S> {}
309321 impl<S: State> State for SetAuthor<S> {
310310- type Cid = S::Cid;
311311- type Author = Set<members::author>;
312312- type Record = S::Record;
313313- type IsRead = S::IsRead;
314322 type Reason = S::Reason;
315315- type Uri = S::Uri;
316316- type IndexedAt = S::IndexedAt;
317317- }
318318- ///State transition - sets the `record` field to Set
319319- pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
320320- impl<S: State> sealed::Sealed for SetRecord<S> {}
321321- impl<S: State> State for SetRecord<S> {
322322- type Cid = S::Cid;
323323- type Author = S::Author;
324324- type Record = Set<members::record>;
325323 type IsRead = S::IsRead;
326326- type Reason = S::Reason;
327327- type Uri = S::Uri;
324324+ type Author = Set<members::author>;
328325 type IndexedAt = S::IndexedAt;
329329- }
330330- ///State transition - sets the `is_read` field to Set
331331- pub struct SetIsRead<S: State = Empty>(PhantomData<fn() -> S>);
332332- impl<S: State> sealed::Sealed for SetIsRead<S> {}
333333- impl<S: State> State for SetIsRead<S> {
326326+ type Uri = S::Uri;
334327 type Cid = S::Cid;
335335- type Author = S::Author;
336328 type Record = S::Record;
337337- type IsRead = Set<members::is_read>;
329329+ }
330330+ ///State transition - sets the `indexed_at` field to Set
331331+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
332332+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
333333+ impl<S: State> State for SetIndexedAt<S> {
338334 type Reason = S::Reason;
335335+ type IsRead = S::IsRead;
336336+ type Author = S::Author;
337337+ type IndexedAt = Set<members::indexed_at>;
339338 type Uri = S::Uri;
340340- type IndexedAt = S::IndexedAt;
341341- }
342342- ///State transition - sets the `reason` field to Set
343343- pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
344344- impl<S: State> sealed::Sealed for SetReason<S> {}
345345- impl<S: State> State for SetReason<S> {
346339 type Cid = S::Cid;
347347- type Author = S::Author;
348340 type Record = S::Record;
349349- type IsRead = S::IsRead;
350350- type Reason = Set<members::reason>;
351351- type Uri = S::Uri;
352352- type IndexedAt = S::IndexedAt;
353341 }
354342 ///State transition - sets the `uri` field to Set
355343 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
356344 impl<S: State> sealed::Sealed for SetUri<S> {}
357345 impl<S: State> State for SetUri<S> {
346346+ type Reason = S::Reason;
347347+ type IsRead = S::IsRead;
348348+ type Author = S::Author;
349349+ type IndexedAt = S::IndexedAt;
350350+ type Uri = Set<members::uri>;
358351 type Cid = S::Cid;
359359- type Author = S::Author;
360352 type Record = S::Record;
361361- type IsRead = S::IsRead;
353353+ }
354354+ ///State transition - sets the `cid` field to Set
355355+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
356356+ impl<S: State> sealed::Sealed for SetCid<S> {}
357357+ impl<S: State> State for SetCid<S> {
362358 type Reason = S::Reason;
363363- type Uri = Set<members::uri>;
359359+ type IsRead = S::IsRead;
360360+ type Author = S::Author;
364361 type IndexedAt = S::IndexedAt;
362362+ type Uri = S::Uri;
363363+ type Cid = Set<members::cid>;
364364+ type Record = S::Record;
365365 }
366366- ///State transition - sets the `indexed_at` field to Set
367367- pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
368368- impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
369369- impl<S: State> State for SetIndexedAt<S> {
370370- type Cid = S::Cid;
371371- type Author = S::Author;
372372- type Record = S::Record;
373373- type IsRead = S::IsRead;
366366+ ///State transition - sets the `record` field to Set
367367+ pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
368368+ impl<S: State> sealed::Sealed for SetRecord<S> {}
369369+ impl<S: State> State for SetRecord<S> {
374370 type Reason = S::Reason;
371371+ type IsRead = S::IsRead;
372372+ type Author = S::Author;
373373+ type IndexedAt = S::IndexedAt;
375374 type Uri = S::Uri;
376376- type IndexedAt = Set<members::indexed_at>;
375375+ type Cid = S::Cid;
376376+ type Record = Set<members::record>;
377377 }
378378 /// Marker types for field names
379379 #[allow(non_camel_case_types)]
380380 pub mod members {
381381- ///Marker type for the `cid` field
382382- pub struct cid(());
383383- ///Marker type for the `author` field
384384- pub struct author(());
385385- ///Marker type for the `record` field
386386- pub struct record(());
387387- ///Marker type for the `is_read` field
388388- pub struct is_read(());
389381 ///Marker type for the `reason` field
390382 pub struct reason(());
391391- ///Marker type for the `uri` field
392392- pub struct uri(());
383383+ ///Marker type for the `is_read` field
384384+ pub struct is_read(());
385385+ ///Marker type for the `author` field
386386+ pub struct author(());
393387 ///Marker type for the `indexed_at` field
394388 pub struct indexed_at(());
389389+ ///Marker type for the `uri` field
390390+ pub struct uri(());
391391+ ///Marker type for the `cid` field
392392+ pub struct cid(());
393393+ ///Marker type for the `record` field
394394+ pub struct record(());
395395 }
396396}
397397···614614impl<'a, S> NotificationBuilder<'a, S>
615615where
616616 S: notification_state::State,
617617- S::Cid: notification_state::IsSet,
618618- S::Author: notification_state::IsSet,
619619- S::Record: notification_state::IsSet,
620620- S::IsRead: notification_state::IsSet,
621617 S::Reason: notification_state::IsSet,
622622- S::Uri: notification_state::IsSet,
618618+ S::IsRead: notification_state::IsSet,
619619+ S::Author: notification_state::IsSet,
623620 S::IndexedAt: notification_state::IsSet,
621621+ S::Uri: notification_state::IsSet,
622622+ S::Cid: notification_state::IsSet,
623623+ S::Record: notification_state::IsSet,
624624{
625625 /// Build the final struct
626626 pub fn build(self) -> Notification<'a> {
···4040 }
4141 /// State trait tracking which required fields have been set
4242 pub trait State: sealed::Sealed {
4343+ type ServiceDid;
4444+ type Token;
4345 type Platform;
4446 type AppId;
4545- type ServiceDid;
4646- type Token;
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 ServiceDid = Unset;
5353+ type Token = Unset;
5254 type Platform = Unset;
5355 type AppId = Unset;
5454- type ServiceDid = Unset;
5555- type Token = Unset;
5656- }
5757- ///State transition - sets the `platform` field to Set
5858- pub struct SetPlatform<S: State = Empty>(PhantomData<fn() -> S>);
5959- impl<S: State> sealed::Sealed for SetPlatform<S> {}
6060- impl<S: State> State for SetPlatform<S> {
6161- type Platform = Set<members::platform>;
6262- type AppId = S::AppId;
6363- type ServiceDid = S::ServiceDid;
6464- type Token = S::Token;
6565- }
6666- ///State transition - sets the `app_id` field to Set
6767- pub struct SetAppId<S: State = Empty>(PhantomData<fn() -> S>);
6868- impl<S: State> sealed::Sealed for SetAppId<S> {}
6969- impl<S: State> State for SetAppId<S> {
7070- type Platform = S::Platform;
7171- type AppId = Set<members::app_id>;
7272- type ServiceDid = S::ServiceDid;
7373- type Token = S::Token;
7456 }
7557 ///State transition - sets the `service_did` field to Set
7658 pub struct SetServiceDid<S: State = Empty>(PhantomData<fn() -> S>);
7759 impl<S: State> sealed::Sealed for SetServiceDid<S> {}
7860 impl<S: State> State for SetServiceDid<S> {
7979- type Platform = S::Platform;
8080- type AppId = S::AppId;
8161 type ServiceDid = Set<members::service_did>;
8262 type Token = S::Token;
6363+ type Platform = S::Platform;
6464+ type AppId = S::AppId;
8365 }
8466 ///State transition - sets the `token` field to Set
8567 pub struct SetToken<S: State = Empty>(PhantomData<fn() -> S>);
8668 impl<S: State> sealed::Sealed for SetToken<S> {}
8769 impl<S: State> State for SetToken<S> {
7070+ type ServiceDid = S::ServiceDid;
7171+ type Token = Set<members::token>;
8872 type Platform = S::Platform;
8973 type AppId = S::AppId;
7474+ }
7575+ ///State transition - sets the `platform` field to Set
7676+ pub struct SetPlatform<S: State = Empty>(PhantomData<fn() -> S>);
7777+ impl<S: State> sealed::Sealed for SetPlatform<S> {}
7878+ impl<S: State> State for SetPlatform<S> {
9079 type ServiceDid = S::ServiceDid;
9191- type Token = Set<members::token>;
8080+ type Token = S::Token;
8181+ type Platform = Set<members::platform>;
8282+ type AppId = S::AppId;
8383+ }
8484+ ///State transition - sets the `app_id` field to Set
8585+ pub struct SetAppId<S: State = Empty>(PhantomData<fn() -> S>);
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;
9090+ type Platform = S::Platform;
9191+ type AppId = Set<members::app_id>;
9292 }
9393 /// Marker types for field names
9494 #[allow(non_camel_case_types)]
9595 pub mod members {
9696- ///Marker type for the `platform` field
9797- pub struct platform(());
9898- ///Marker type for the `app_id` field
9999- pub struct app_id(());
10096 ///Marker type for the `service_did` field
10197 pub struct service_did(());
10298 ///Marker type for the `token` field
10399 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 }
105105}
106106···227227impl<'a, S> RegisterPushBuilder<'a, S>
228228where
229229 S: register_push_state::State,
230230+ S::ServiceDid: register_push_state::IsSet,
231231+ S::Token: register_push_state::IsSet,
230232 S::Platform: register_push_state::IsSet,
231233 S::AppId: register_push_state::IsSet,
232232- S::ServiceDid: register_push_state::IsSet,
233233- S::Token: register_push_state::IsSet,
234234{
235235 /// Build the final struct
236236 pub fn build(self) -> RegisterPush<'a> {
···3838 /// State trait tracking which required fields have been set
3939 pub trait State: sealed::Sealed {
4040 type AppId;
4141- type ServiceDid;
4242- type Token;
4341 type Platform;
4242+ type Token;
4343+ type ServiceDid;
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 AppId = Unset;
5050- type ServiceDid = Unset;
5151- type Token = Unset;
5250 type Platform = Unset;
5151+ type Token = Unset;
5252+ type ServiceDid = Unset;
5353 }
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>;
5959- type ServiceDid = S::ServiceDid;
6060- type Token = S::Token;
6159 type Platform = S::Platform;
6060+ type Token = S::Token;
6161+ type ServiceDid = S::ServiceDid;
6262 }
6363- ///State transition - sets the `service_did` field to Set
6464- pub struct SetServiceDid<S: State = Empty>(PhantomData<fn() -> S>);
6565- impl<S: State> sealed::Sealed for SetServiceDid<S> {}
6666- impl<S: State> State for SetServiceDid<S> {
6363+ ///State transition - sets the `platform` field to Set
6464+ pub struct SetPlatform<S: State = Empty>(PhantomData<fn() -> S>);
6565+ impl<S: State> sealed::Sealed for SetPlatform<S> {}
6666+ impl<S: State> State for SetPlatform<S> {
6767 type AppId = S::AppId;
6868- type ServiceDid = Set<members::service_did>;
6868+ type Platform = Set<members::platform>;
6969 type Token = S::Token;
7070- type Platform = S::Platform;
7070+ type ServiceDid = S::ServiceDid;
7171 }
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 ServiceDid = S::ServiceDid;
7777+ type Platform = S::Platform;
7878 type Token = Set<members::token>;
7979- type Platform = S::Platform;
7979+ type ServiceDid = S::ServiceDid;
8080 }
8181- ///State transition - sets the `platform` field to Set
8282- pub struct SetPlatform<S: State = Empty>(PhantomData<fn() -> S>);
8383- impl<S: State> sealed::Sealed for SetPlatform<S> {}
8484- impl<S: State> State for SetPlatform<S> {
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;
8686- type ServiceDid = S::ServiceDid;
8686+ type Platform = S::Platform;
8787 type Token = S::Token;
8888- type Platform = Set<members::platform>;
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 `app_id` field
9494 pub struct app_id(());
9595- ///Marker type for the `service_did` field
9696- pub struct service_did(());
9797- ///Marker type for the `token` field
9898- pub struct token(());
9995 ///Marker type for the `platform` field
10096 pub struct platform(());
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···211211where
212212 S: unregister_push_state::State,
213213 S::AppId: unregister_push_state::IsSet,
214214- S::ServiceDid: unregister_push_state::IsSet,
215215- S::Token: unregister_push_state::IsSet,
216214 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> {
+171-171
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 Status;
8584 type CreatedAt;
8685 type AttemptId;
8686+ type Status;
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 Status = Unset;
9392 type CreatedAt = Unset;
9493 type AttemptId = Unset;
9595- }
9696- ///State transition - sets the `status` field to Set
9797- pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
9898- impl<S: State> sealed::Sealed for SetStatus<S> {}
9999- impl<S: State> State for SetStatus<S> {
100100- type Status = Set<members::status>;
101101- type CreatedAt = S::CreatedAt;
102102- type AttemptId = S::AttemptId;
9494+ type Status = Unset;
10395 }
10496 ///State transition - sets the `created_at` field to Set
10597 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
10698 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
10799 impl<S: State> State for SetCreatedAt<S> {
108108- type Status = S::Status;
109100 type CreatedAt = Set<members::created_at>;
110101 type AttemptId = S::AttemptId;
102102+ type Status = S::Status;
111103 }
112104 ///State transition - sets the `attempt_id` field to Set
113105 pub struct SetAttemptId<S: State = Empty>(PhantomData<fn() -> S>);
114106 impl<S: State> sealed::Sealed for SetAttemptId<S> {}
115107 impl<S: State> State for SetAttemptId<S> {
116116- type Status = S::Status;
117108 type CreatedAt = S::CreatedAt;
118109 type AttemptId = Set<members::attempt_id>;
110110+ type Status = S::Status;
111111+ }
112112+ ///State transition - sets the `status` field to Set
113113+ pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
114114+ impl<S: State> sealed::Sealed for SetStatus<S> {}
115115+ impl<S: State> State for SetStatus<S> {
116116+ type CreatedAt = S::CreatedAt;
117117+ type AttemptId = S::AttemptId;
118118+ type Status = Set<members::status>;
119119 }
120120 /// Marker types for field names
121121 #[allow(non_camel_case_types)]
122122 pub mod members {
123123- ///Marker type for the `status` field
124124- pub struct status(());
125123 ///Marker type for the `created_at` field
126124 pub struct created_at(());
127125 ///Marker type for the `attempt_id` field
128126 pub struct attempt_id(());
127127+ ///Marker type for the `status` field
128128+ pub struct status(());
129129 }
130130}
131131···309309impl<'a, S> AgeAssuranceEventBuilder<'a, S>
310310where
311311 S: age_assurance_event_state::State,
312312- S::Status: age_assurance_event_state::IsSet,
313312 S::CreatedAt: age_assurance_event_state::IsSet,
314313 S::AttemptId: age_assurance_event_state::IsSet,
314314+ S::Status: age_assurance_event_state::IsSet,
315315{
316316 /// Build the final struct
317317 pub fn build(self) -> AgeAssuranceEvent<'a> {
···19401940 }
19411941 /// State trait tracking which required fields have been set
19421942 pub trait State: sealed::Sealed {
19431943- type Dids;
19441944- type Link;
19451943 type Topic;
19461944 type StartedAt;
19471945 type PostCount;
19461946+ type Dids;
19481947 type DisplayName;
19481948+ type Link;
19491949 }
19501950 /// Empty state - all required fields are unset
19511951 pub struct Empty(());
19521952 impl sealed::Sealed for Empty {}
19531953 impl State for Empty {
19541954- type Dids = Unset;
19551955- type Link = Unset;
19561954 type Topic = Unset;
19571955 type StartedAt = Unset;
19581956 type PostCount = Unset;
19571957+ type Dids = Unset;
19591958 type DisplayName = Unset;
19601960- }
19611961- ///State transition - sets the `dids` field to Set
19621962- pub struct SetDids<S: State = Empty>(PhantomData<fn() -> S>);
19631963- impl<S: State> sealed::Sealed for SetDids<S> {}
19641964- impl<S: State> State for SetDids<S> {
19651965- type Dids = Set<members::dids>;
19661966- type Link = S::Link;
19671967- type Topic = S::Topic;
19681968- type StartedAt = S::StartedAt;
19691969- type PostCount = S::PostCount;
19701970- type DisplayName = S::DisplayName;
19711971- }
19721972- ///State transition - sets the `link` field to Set
19731973- pub struct SetLink<S: State = Empty>(PhantomData<fn() -> S>);
19741974- impl<S: State> sealed::Sealed for SetLink<S> {}
19751975- impl<S: State> State for SetLink<S> {
19761976- type Dids = S::Dids;
19771977- type Link = Set<members::link>;
19781978- type Topic = S::Topic;
19791979- type StartedAt = S::StartedAt;
19801980- type PostCount = S::PostCount;
19811981- type DisplayName = S::DisplayName;
19591959+ type Link = Unset;
19821960 }
19831961 ///State transition - sets the `topic` field to Set
19841962 pub struct SetTopic<S: State = Empty>(PhantomData<fn() -> S>);
19851963 impl<S: State> sealed::Sealed for SetTopic<S> {}
19861964 impl<S: State> State for SetTopic<S> {
19871987- type Dids = S::Dids;
19881988- type Link = S::Link;
19891965 type Topic = Set<members::topic>;
19901966 type StartedAt = S::StartedAt;
19911967 type PostCount = S::PostCount;
19681968+ type Dids = S::Dids;
19921969 type DisplayName = S::DisplayName;
19701970+ type Link = S::Link;
19931971 }
19941972 ///State transition - sets the `started_at` field to Set
19951973 pub struct SetStartedAt<S: State = Empty>(PhantomData<fn() -> S>);
19961974 impl<S: State> sealed::Sealed for SetStartedAt<S> {}
19971975 impl<S: State> State for SetStartedAt<S> {
19981998- type Dids = S::Dids;
19991999- type Link = S::Link;
20001976 type Topic = S::Topic;
20011977 type StartedAt = Set<members::started_at>;
20021978 type PostCount = S::PostCount;
19791979+ type Dids = S::Dids;
20031980 type DisplayName = S::DisplayName;
19811981+ type Link = S::Link;
20041982 }
20051983 ///State transition - sets the `post_count` field to Set
20061984 pub struct SetPostCount<S: State = Empty>(PhantomData<fn() -> S>);
20071985 impl<S: State> sealed::Sealed for SetPostCount<S> {}
20081986 impl<S: State> State for SetPostCount<S> {
19871987+ type Topic = S::Topic;
19881988+ type StartedAt = S::StartedAt;
19891989+ type PostCount = Set<members::post_count>;
20091990 type Dids = S::Dids;
19911991+ type DisplayName = S::DisplayName;
20101992 type Link = S::Link;
19931993+ }
19941994+ ///State transition - sets the `dids` field to Set
19951995+ pub struct SetDids<S: State = Empty>(PhantomData<fn() -> S>);
19961996+ impl<S: State> sealed::Sealed for SetDids<S> {}
19971997+ impl<S: State> State for SetDids<S> {
20111998 type Topic = S::Topic;
20121999 type StartedAt = S::StartedAt;
20132013- type PostCount = Set<members::post_count>;
20002000+ type PostCount = S::PostCount;
20012001+ type Dids = Set<members::dids>;
20142002 type DisplayName = S::DisplayName;
20032003+ type Link = S::Link;
20152004 }
20162005 ///State transition - sets the `display_name` field to Set
20172006 pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>);
20182007 impl<S: State> sealed::Sealed for SetDisplayName<S> {}
20192008 impl<S: State> State for SetDisplayName<S> {
20092009+ type Topic = S::Topic;
20102010+ type StartedAt = S::StartedAt;
20112011+ type PostCount = S::PostCount;
20202012 type Dids = S::Dids;
20132013+ type DisplayName = Set<members::display_name>;
20212014 type Link = S::Link;
20152015+ }
20162016+ ///State transition - sets the `link` field to Set
20172017+ pub struct SetLink<S: State = Empty>(PhantomData<fn() -> S>);
20182018+ impl<S: State> sealed::Sealed for SetLink<S> {}
20192019+ impl<S: State> State for SetLink<S> {
20222020 type Topic = S::Topic;
20232021 type StartedAt = S::StartedAt;
20242022 type PostCount = S::PostCount;
20252025- type DisplayName = Set<members::display_name>;
20232023+ type Dids = S::Dids;
20242024+ type DisplayName = S::DisplayName;
20252025+ type Link = Set<members::link>;
20262026 }
20272027 /// Marker types for field names
20282028 #[allow(non_camel_case_types)]
20292029 pub mod members {
20302030- ///Marker type for the `dids` field
20312031- pub struct dids(());
20322032- ///Marker type for the `link` field
20332033- pub struct link(());
20342030 ///Marker type for the `topic` field
20352031 pub struct topic(());
20362032 ///Marker type for the `started_at` field
20372033 pub struct started_at(());
20382034 ///Marker type for the `post_count` field
20392035 pub struct post_count(());
20362036+ ///Marker type for the `dids` field
20372037+ pub struct dids(());
20402038 ///Marker type for the `display_name` field
20412039 pub struct display_name(());
20402040+ ///Marker type for the `link` field
20412041+ pub struct link(());
20422042 }
20432043}
20442044···22222222impl<'a, S> SkeletonTrendBuilder<'a, S>
22232223where
22242224 S: skeleton_trend_state::State,
22252225- S::Dids: skeleton_trend_state::IsSet,
22262226- S::Link: skeleton_trend_state::IsSet,
22272225 S::Topic: skeleton_trend_state::IsSet,
22282226 S::StartedAt: skeleton_trend_state::IsSet,
22292227 S::PostCount: skeleton_trend_state::IsSet,
22282228+ S::Dids: skeleton_trend_state::IsSet,
22302229 S::DisplayName: skeleton_trend_state::IsSet,
22302230+ S::Link: skeleton_trend_state::IsSet,
22312231{
22322232 /// Build the final struct
22332233 pub fn build(self) -> SkeletonTrend<'a> {
···25992599 }
26002600 /// State trait tracking which required fields have been set
26012601 pub trait State: sealed::Sealed {
26022602- type MutedByViewer;
26032603- type MoreParents;
26022602+ type Post;
26042603 type MoreReplies;
26052605- type OpThread;
26062606- type Post;
26072604 type HiddenByThreadgate;
26052605+ type OpThread;
26062606+ type MutedByViewer;
26072607+ type MoreParents;
26082608 }
26092609 /// Empty state - all required fields are unset
26102610 pub struct Empty(());
26112611 impl sealed::Sealed for Empty {}
26122612 impl State for Empty {
26132613- type MutedByViewer = Unset;
26142614- type MoreParents = Unset;
26132613+ type Post = Unset;
26152614 type MoreReplies = Unset;
26152615+ type HiddenByThreadgate = Unset;
26162616 type OpThread = Unset;
26172617- type Post = Unset;
26182618- type HiddenByThreadgate = Unset;
26172617+ type MutedByViewer = Unset;
26182618+ type MoreParents = Unset;
26192619 }
26202620- ///State transition - sets the `muted_by_viewer` field to Set
26212621- pub struct SetMutedByViewer<S: State = Empty>(PhantomData<fn() -> S>);
26222622- impl<S: State> sealed::Sealed for SetMutedByViewer<S> {}
26232623- impl<S: State> State for SetMutedByViewer<S> {
26242624- type MutedByViewer = Set<members::muted_by_viewer>;
26252625- type MoreParents = S::MoreParents;
26202620+ ///State transition - sets the `post` field to Set
26212621+ pub struct SetPost<S: State = Empty>(PhantomData<fn() -> S>);
26222622+ impl<S: State> sealed::Sealed for SetPost<S> {}
26232623+ impl<S: State> State for SetPost<S> {
26242624+ type Post = Set<members::post>;
26262625 type MoreReplies = S::MoreReplies;
26272627- type OpThread = S::OpThread;
26282628- type Post = S::Post;
26292626 type HiddenByThreadgate = S::HiddenByThreadgate;
26302630- }
26312631- ///State transition - sets the `more_parents` field to Set
26322632- pub struct SetMoreParents<S: State = Empty>(PhantomData<fn() -> S>);
26332633- impl<S: State> sealed::Sealed for SetMoreParents<S> {}
26342634- impl<S: State> State for SetMoreParents<S> {
26352635- type MutedByViewer = S::MutedByViewer;
26362636- type MoreParents = Set<members::more_parents>;
26372637- type MoreReplies = S::MoreReplies;
26382627 type OpThread = S::OpThread;
26392639- type Post = S::Post;
26402640- type HiddenByThreadgate = S::HiddenByThreadgate;
26282628+ type MutedByViewer = S::MutedByViewer;
26292629+ type MoreParents = S::MoreParents;
26412630 }
26422631 ///State transition - sets the `more_replies` field to Set
26432632 pub struct SetMoreReplies<S: State = Empty>(PhantomData<fn() -> S>);
26442633 impl<S: State> sealed::Sealed for SetMoreReplies<S> {}
26452634 impl<S: State> State for SetMoreReplies<S> {
26462646- type MutedByViewer = S::MutedByViewer;
26472647- type MoreParents = S::MoreParents;
26352635+ type Post = S::Post;
26482636 type MoreReplies = Set<members::more_replies>;
26372637+ type HiddenByThreadgate = S::HiddenByThreadgate;
26492638 type OpThread = S::OpThread;
26392639+ type MutedByViewer = S::MutedByViewer;
26402640+ type MoreParents = S::MoreParents;
26412641+ }
26422642+ ///State transition - sets the `hidden_by_threadgate` field to Set
26432643+ pub struct SetHiddenByThreadgate<S: State = Empty>(PhantomData<fn() -> S>);
26442644+ impl<S: State> sealed::Sealed for SetHiddenByThreadgate<S> {}
26452645+ impl<S: State> State for SetHiddenByThreadgate<S> {
26502646 type Post = S::Post;
26512651- type HiddenByThreadgate = S::HiddenByThreadgate;
26472647+ type MoreReplies = S::MoreReplies;
26482648+ type HiddenByThreadgate = Set<members::hidden_by_threadgate>;
26492649+ type OpThread = S::OpThread;
26502650+ type MutedByViewer = S::MutedByViewer;
26512651+ type MoreParents = S::MoreParents;
26522652 }
26532653 ///State transition - sets the `op_thread` field to Set
26542654 pub struct SetOpThread<S: State = Empty>(PhantomData<fn() -> S>);
26552655 impl<S: State> sealed::Sealed for SetOpThread<S> {}
26562656 impl<S: State> State for SetOpThread<S> {
26572657- type MutedByViewer = S::MutedByViewer;
26582658- type MoreParents = S::MoreParents;
26572657+ type Post = S::Post;
26592658 type MoreReplies = S::MoreReplies;
26602660- type OpThread = Set<members::op_thread>;
26612661- type Post = S::Post;
26622659 type HiddenByThreadgate = S::HiddenByThreadgate;
26632663- }
26642664- ///State transition - sets the `post` field to Set
26652665- pub struct SetPost<S: State = Empty>(PhantomData<fn() -> S>);
26662666- impl<S: State> sealed::Sealed for SetPost<S> {}
26672667- impl<S: State> State for SetPost<S> {
26602660+ type OpThread = Set<members::op_thread>;
26682661 type MutedByViewer = S::MutedByViewer;
26692662 type MoreParents = S::MoreParents;
26632663+ }
26642664+ ///State transition - sets the `muted_by_viewer` field to Set
26652665+ pub struct SetMutedByViewer<S: State = Empty>(PhantomData<fn() -> S>);
26662666+ impl<S: State> sealed::Sealed for SetMutedByViewer<S> {}
26672667+ impl<S: State> State for SetMutedByViewer<S> {
26682668+ type Post = S::Post;
26702669 type MoreReplies = S::MoreReplies;
26712671- type OpThread = S::OpThread;
26722672- type Post = Set<members::post>;
26732670 type HiddenByThreadgate = S::HiddenByThreadgate;
26742674- }
26752675- ///State transition - sets the `hidden_by_threadgate` field to Set
26762676- pub struct SetHiddenByThreadgate<S: State = Empty>(PhantomData<fn() -> S>);
26772677- impl<S: State> sealed::Sealed for SetHiddenByThreadgate<S> {}
26782678- impl<S: State> State for SetHiddenByThreadgate<S> {
26792679- type MutedByViewer = S::MutedByViewer;
26712671+ type OpThread = S::OpThread;
26722672+ type MutedByViewer = Set<members::muted_by_viewer>;
26802673 type MoreParents = S::MoreParents;
26742674+ }
26752675+ ///State transition - sets the `more_parents` field to Set
26762676+ pub struct SetMoreParents<S: State = Empty>(PhantomData<fn() -> S>);
26772677+ impl<S: State> sealed::Sealed for SetMoreParents<S> {}
26782678+ impl<S: State> State for SetMoreParents<S> {
26792679+ type Post = S::Post;
26812680 type MoreReplies = S::MoreReplies;
26812681+ type HiddenByThreadgate = S::HiddenByThreadgate;
26822682 type OpThread = S::OpThread;
26832683- type Post = S::Post;
26842684- type HiddenByThreadgate = Set<members::hidden_by_threadgate>;
26832683+ type MutedByViewer = S::MutedByViewer;
26842684+ type MoreParents = Set<members::more_parents>;
26852685 }
26862686 /// Marker types for field names
26872687 #[allow(non_camel_case_types)]
26882688 pub mod members {
26892689- ///Marker type for the `muted_by_viewer` field
26902690- pub struct muted_by_viewer(());
26912691- ///Marker type for the `more_parents` field
26922692- pub struct more_parents(());
26932693- ///Marker type for the `more_replies` field
26942694- pub struct more_replies(());
26952695- ///Marker type for the `op_thread` field
26962696- pub struct op_thread(());
26972689 ///Marker type for the `post` field
26982690 pub struct post(());
26912691+ ///Marker type for the `more_replies` field
26922692+ pub struct more_replies(());
26992693 ///Marker type for the `hidden_by_threadgate` field
27002694 pub struct hidden_by_threadgate(());
26952695+ ///Marker type for the `op_thread` field
26962696+ pub struct op_thread(());
26972697+ ///Marker type for the `muted_by_viewer` field
26982698+ pub struct muted_by_viewer(());
26992699+ ///Marker type for the `more_parents` field
27002700+ pub struct more_parents(());
27012701 }
27022702}
27032703···28502850impl<'a, S> ThreadItemPostBuilder<'a, S>
28512851where
28522852 S: thread_item_post_state::State,
28532853- S::MutedByViewer: thread_item_post_state::IsSet,
28542854- S::MoreParents: thread_item_post_state::IsSet,
28532853+ S::Post: thread_item_post_state::IsSet,
28552854 S::MoreReplies: thread_item_post_state::IsSet,
28552855+ S::HiddenByThreadgate: thread_item_post_state::IsSet,
28562856 S::OpThread: thread_item_post_state::IsSet,
28572857- S::Post: thread_item_post_state::IsSet,
28582858- S::HiddenByThreadgate: thread_item_post_state::IsSet,
28572857+ S::MutedByViewer: thread_item_post_state::IsSet,
28582858+ S::MoreParents: thread_item_post_state::IsSet,
28592859{
28602860 /// Build the final struct
28612861 pub fn build(self) -> ThreadItemPost<'a> {
···29462946 }
29472947 /// State trait tracking which required fields have been set
29482948 pub trait State: sealed::Sealed {
29492949- type Topic;
29502950- type Actors;
29512951- type StartedAt;
29522949 type PostCount;
29532953- type Link;
29542950 type DisplayName;
29512951+ type StartedAt;
29522952+ type Topic;
29532953+ type Link;
29542954+ type Actors;
29552955 }
29562956 /// Empty state - all required fields are unset
29572957 pub struct Empty(());
29582958 impl sealed::Sealed for Empty {}
29592959 impl State for Empty {
29602960+ type PostCount = Unset;
29612961+ type DisplayName = Unset;
29622962+ type StartedAt = Unset;
29602963 type Topic = Unset;
29642964+ type Link = Unset;
29612965 type Actors = Unset;
29622962- type StartedAt = Unset;
29632963- type PostCount = Unset;
29642964- type Link = Unset;
29652965- type DisplayName = Unset;
29662966 }
29672967- ///State transition - sets the `topic` field to Set
29682968- pub struct SetTopic<S: State = Empty>(PhantomData<fn() -> S>);
29692969- impl<S: State> sealed::Sealed for SetTopic<S> {}
29702970- impl<S: State> State for SetTopic<S> {
29712971- type Topic = Set<members::topic>;
29722972- type Actors = S::Actors;
29672967+ ///State transition - sets the `post_count` field to Set
29682968+ pub struct SetPostCount<S: State = Empty>(PhantomData<fn() -> S>);
29692969+ impl<S: State> sealed::Sealed for SetPostCount<S> {}
29702970+ impl<S: State> State for SetPostCount<S> {
29712971+ type PostCount = Set<members::post_count>;
29722972+ type DisplayName = S::DisplayName;
29732973 type StartedAt = S::StartedAt;
29742974- type PostCount = S::PostCount;
29742974+ type Topic = S::Topic;
29752975 type Link = S::Link;
29762976- type DisplayName = S::DisplayName;
29762976+ type Actors = S::Actors;
29772977 }
29782978- ///State transition - sets the `actors` field to Set
29792979- pub struct SetActors<S: State = Empty>(PhantomData<fn() -> S>);
29802980- impl<S: State> sealed::Sealed for SetActors<S> {}
29812981- impl<S: State> State for SetActors<S> {
29822982- type Topic = S::Topic;
29832983- type Actors = Set<members::actors>;
29782978+ ///State transition - sets the `display_name` field to Set
29792979+ pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>);
29802980+ impl<S: State> sealed::Sealed for SetDisplayName<S> {}
29812981+ impl<S: State> State for SetDisplayName<S> {
29822982+ type PostCount = S::PostCount;
29832983+ type DisplayName = Set<members::display_name>;
29842984 type StartedAt = S::StartedAt;
29852985- type PostCount = S::PostCount;
29852985+ type Topic = S::Topic;
29862986 type Link = S::Link;
29872987- type DisplayName = S::DisplayName;
29872987+ type Actors = S::Actors;
29882988 }
29892989 ///State transition - sets the `started_at` field to Set
29902990 pub struct SetStartedAt<S: State = Empty>(PhantomData<fn() -> S>);
29912991 impl<S: State> sealed::Sealed for SetStartedAt<S> {}
29922992 impl<S: State> State for SetStartedAt<S> {
29932993+ type PostCount = S::PostCount;
29942994+ type DisplayName = S::DisplayName;
29952995+ type StartedAt = Set<members::started_at>;
29932996 type Topic = S::Topic;
29972997+ type Link = S::Link;
29942998 type Actors = S::Actors;
29952995- type StartedAt = Set<members::started_at>;
29992999+ }
30003000+ ///State transition - sets the `topic` field to Set
30013001+ pub struct SetTopic<S: State = Empty>(PhantomData<fn() -> S>);
30023002+ impl<S: State> sealed::Sealed for SetTopic<S> {}
30033003+ impl<S: State> State for SetTopic<S> {
29963004 type PostCount = S::PostCount;
29972997- type Link = S::Link;
29983005 type DisplayName = S::DisplayName;
29992999- }
30003000- ///State transition - sets the `post_count` field to Set
30013001- pub struct SetPostCount<S: State = Empty>(PhantomData<fn() -> S>);
30023002- impl<S: State> sealed::Sealed for SetPostCount<S> {}
30033003- impl<S: State> State for SetPostCount<S> {
30043004- type Topic = S::Topic;
30053005- type Actors = S::Actors;
30063006 type StartedAt = S::StartedAt;
30073007- type PostCount = Set<members::post_count>;
30073007+ type Topic = Set<members::topic>;
30083008 type Link = S::Link;
30093009- type DisplayName = S::DisplayName;
30093009+ type Actors = S::Actors;
30103010 }
30113011 ///State transition - sets the `link` field to Set
30123012 pub struct SetLink<S: State = Empty>(PhantomData<fn() -> S>);
30133013 impl<S: State> sealed::Sealed for SetLink<S> {}
30143014 impl<S: State> State for SetLink<S> {
30153015- type Topic = S::Topic;
30163016- type Actors = S::Actors;
30173017- type StartedAt = S::StartedAt;
30183015 type PostCount = S::PostCount;
30193019- type Link = Set<members::link>;
30203016 type DisplayName = S::DisplayName;
30213021- }
30223022- ///State transition - sets the `display_name` field to Set
30233023- pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>);
30243024- impl<S: State> sealed::Sealed for SetDisplayName<S> {}
30253025- impl<S: State> State for SetDisplayName<S> {
30173017+ type StartedAt = S::StartedAt;
30263018 type Topic = S::Topic;
30193019+ type Link = Set<members::link>;
30273020 type Actors = S::Actors;
30283028- type StartedAt = S::StartedAt;
30213021+ }
30223022+ ///State transition - sets the `actors` field to Set
30233023+ pub struct SetActors<S: State = Empty>(PhantomData<fn() -> S>);
30243024+ impl<S: State> sealed::Sealed for SetActors<S> {}
30253025+ impl<S: State> State for SetActors<S> {
30293026 type PostCount = S::PostCount;
30273027+ type DisplayName = S::DisplayName;
30283028+ type StartedAt = S::StartedAt;
30293029+ type Topic = S::Topic;
30303030 type Link = S::Link;
30313031- type DisplayName = Set<members::display_name>;
30313031+ type Actors = Set<members::actors>;
30323032 }
30333033 /// Marker types for field names
30343034 #[allow(non_camel_case_types)]
30353035 pub mod members {
30363036+ ///Marker type for the `post_count` field
30373037+ pub struct post_count(());
30383038+ ///Marker type for the `display_name` field
30393039+ pub struct display_name(());
30403040+ ///Marker type for the `started_at` field
30413041+ pub struct started_at(());
30363042 ///Marker type for the `topic` field
30373043 pub struct topic(());
30443044+ ///Marker type for the `link` field
30453045+ pub struct link(());
30383046 ///Marker type for the `actors` field
30393047 pub struct actors(());
30403040- ///Marker type for the `started_at` field
30413041- pub struct started_at(());
30423042- ///Marker type for the `post_count` field
30433043- pub struct post_count(());
30443044- ///Marker type for the `link` field
30453045- pub struct link(());
30463046- ///Marker type for the `display_name` field
30473047- pub struct display_name(());
30483048 }
30493049}
30503050···32283228impl<'a, S> TrendViewBuilder<'a, S>
32293229where
32303230 S: trend_view_state::State,
32313231- S::Topic: trend_view_state::IsSet,
32323232- S::Actors: trend_view_state::IsSet,
32333233- S::StartedAt: trend_view_state::IsSet,
32343231 S::PostCount: trend_view_state::IsSet,
32353235- S::Link: trend_view_state::IsSet,
32363232 S::DisplayName: trend_view_state::IsSet,
32333233+ S::StartedAt: trend_view_state::IsSet,
32343234+ S::Topic: trend_view_state::IsSet,
32353235+ S::Link: trend_view_state::IsSet,
32363236+ S::Actors: trend_view_state::IsSet,
32373237{
32383238 /// Build the final struct
32393239 pub fn build(self) -> TrendView<'a> {
···3333 }
3434 /// State trait tracking which required fields have been set
3535 pub trait State: sealed::Sealed {
3636- type Did;
3736 type Domains;
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 Domains = 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 Domains = S::Domains;
4444+ type Did = Unset;
5245 }
5346 ///State transition - sets the `domains` field to Set
5447 pub struct SetDomains<S: State = Empty>(PhantomData<fn() -> S>);
5548 impl<S: State> sealed::Sealed for SetDomains<S> {}
5649 impl<S: State> State for SetDomains<S> {
5757- type Did = S::Did;
5850 type Domains = Set<members::domains>;
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 Domains = S::Domains;
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 `domains` field
6664 pub struct domains(());
6565+ ///Marker type for the `did` field
6666+ pub struct did(());
6767 }
6868}
6969···136136impl<'a, S> LiveNowConfigBuilder<'a, S>
137137where
138138 S: live_now_config_state::State,
139139- S::Did: live_now_config_state::IsSet,
140139 S::Domains: live_now_config_state::IsSet,
140140+ S::Did: live_now_config_state::IsSet,
141141{
142142 /// Build the final struct
143143 pub fn build(self) -> LiveNowConfig<'a> {
···189189 }
190190 /// State trait tracking which required fields have been set
191191 pub trait State: sealed::Sealed {
192192- type Depth;
193193- type Value;
194192 type Uri;
193193+ type Value;
194194+ type Depth;
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 Uri = Unset;
201201+ type Value = Unset;
200202 type Depth = Unset;
201201- type Value = Unset;
202202- type Uri = Unset;
203203 }
204204- ///State transition - sets the `depth` field to Set
205205- pub struct SetDepth<S: State = Empty>(PhantomData<fn() -> S>);
206206- impl<S: State> sealed::Sealed for SetDepth<S> {}
207207- impl<S: State> State for SetDepth<S> {
208208- type Depth = Set<members::depth>;
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>;
209209 type Value = S::Value;
210210- type Uri = S::Uri;
210210+ type Depth = S::Depth;
211211 }
212212 ///State transition - sets the `value` field to Set
213213 pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
214214 impl<S: State> sealed::Sealed for SetValue<S> {}
215215 impl<S: State> State for SetValue<S> {
216216- type Depth = S::Depth;
217217- type Value = Set<members::value>;
218216 type Uri = S::Uri;
217217+ type Value = Set<members::value>;
218218+ type Depth = S::Depth;
219219 }
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 Depth = S::Depth;
220220+ ///State transition - sets the `depth` field to Set
221221+ pub struct SetDepth<S: State = Empty>(PhantomData<fn() -> S>);
222222+ impl<S: State> sealed::Sealed for SetDepth<S> {}
223223+ impl<S: State> State for SetDepth<S> {
224224+ type Uri = S::Uri;
225225 type Value = S::Value;
226226- type Uri = Set<members::uri>;
226226+ type Depth = Set<members::depth>;
227227 }
228228 /// Marker types for field names
229229 #[allow(non_camel_case_types)]
230230 pub mod members {
231231+ ///Marker type for the `uri` field
232232+ pub struct uri(());
233233+ ///Marker type for the `value` field
234234+ pub struct value(());
231235 ///Marker type for the `depth` field
232236 pub struct depth(());
233233- ///Marker type for the `value` field
234234- pub struct value(());
235235- ///Marker type for the `uri` field
236236- pub struct uri(());
237237 }
238238}
239239···326326impl<'a, S> ThreadItemBuilder<'a, S>
327327where
328328 S: thread_item_state::State,
329329- S::Depth: thread_item_state::IsSet,
330330- S::Value: thread_item_state::IsSet,
331329 S::Uri: thread_item_state::IsSet,
330330+ S::Value: thread_item_state::IsSet,
331331+ S::Depth: thread_item_state::IsSet,
332332{
333333 /// Build the final struct
334334 pub fn build(self) -> ThreadItem<'a> {
···265265 }
266266 /// State trait tracking which required fields have been set
267267 pub trait State: sealed::Sealed {
268268- type Depth;
269269- type Uri;
270268 type Value;
269269+ type Uri;
270270+ type Depth;
271271 }
272272 /// Empty state - all required fields are unset
273273 pub struct Empty(());
274274 impl sealed::Sealed for Empty {}
275275 impl State for Empty {
276276+ type Value = Unset;
277277+ type Uri = Unset;
276278 type Depth = Unset;
277277- type Uri = Unset;
278278- type Value = Unset;
279279 }
280280- ///State transition - sets the `depth` field to Set
281281- pub struct SetDepth<S: State = Empty>(PhantomData<fn() -> S>);
282282- impl<S: State> sealed::Sealed for SetDepth<S> {}
283283- impl<S: State> State for SetDepth<S> {
284284- type Depth = Set<members::depth>;
280280+ ///State transition - sets the `value` field to Set
281281+ pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
282282+ impl<S: State> sealed::Sealed for SetValue<S> {}
283283+ impl<S: State> State for SetValue<S> {
284284+ type Value = Set<members::value>;
285285 type Uri = S::Uri;
286286- type Value = S::Value;
286286+ type Depth = S::Depth;
287287 }
288288 ///State transition - sets the `uri` field to Set
289289 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
290290 impl<S: State> sealed::Sealed for SetUri<S> {}
291291 impl<S: State> State for SetUri<S> {
292292- type Depth = S::Depth;
293293- type Uri = Set<members::uri>;
294292 type Value = S::Value;
293293+ type Uri = Set<members::uri>;
294294+ type Depth = S::Depth;
295295 }
296296- ///State transition - sets the `value` field to Set
297297- pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
298298- impl<S: State> sealed::Sealed for SetValue<S> {}
299299- impl<S: State> State for SetValue<S> {
300300- type Depth = S::Depth;
296296+ ///State transition - sets the `depth` field to Set
297297+ pub struct SetDepth<S: State = Empty>(PhantomData<fn() -> S>);
298298+ impl<S: State> sealed::Sealed for SetDepth<S> {}
299299+ impl<S: State> State for SetDepth<S> {
300300+ type Value = S::Value;
301301 type Uri = S::Uri;
302302- type Value = Set<members::value>;
302302+ type Depth = Set<members::depth>;
303303 }
304304 /// Marker types for field names
305305 #[allow(non_camel_case_types)]
306306 pub mod members {
307307+ ///Marker type for the `value` field
308308+ pub struct value(());
309309+ ///Marker type for the `uri` field
310310+ pub struct uri(());
307311 ///Marker type for the `depth` field
308312 pub struct depth(());
309309- ///Marker type for the `uri` field
310310- pub struct uri(());
311311- ///Marker type for the `value` field
312312- pub struct value(());
313313 }
314314}
315315···402402impl<'a, S> ThreadItemBuilder<'a, S>
403403where
404404 S: thread_item_state::State,
405405- S::Depth: thread_item_state::IsSet,
406406- S::Uri: thread_item_state::IsSet,
407405 S::Value: thread_item_state::IsSet,
406406+ S::Uri: thread_item_state::IsSet,
407407+ S::Depth: thread_item_state::IsSet,
408408{
409409 /// Build the final struct
410410 pub fn build(self) -> ThreadItem<'a> {
···9191 /// State trait tracking which required fields have been set
9292 pub trait State: sealed::Sealed {
9393 type SubjectType;
9494- type Tag;
9594 type Subject;
9595+ type Tag;
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 SubjectType = Unset;
102102- type Tag = Unset;
103102 type Subject = Unset;
103103+ type Tag = Unset;
104104 }
105105 ///State transition - sets the `subject_type` field to Set
106106 pub struct SetSubjectType<S: State = Empty>(PhantomData<fn() -> S>);
107107 impl<S: State> sealed::Sealed for SetSubjectType<S> {}
108108 impl<S: State> State for SetSubjectType<S> {
109109 type SubjectType = Set<members::subject_type>;
110110- type Tag = S::Tag;
111110 type Subject = S::Subject;
112112- }
113113- ///State transition - sets the `tag` field to Set
114114- pub struct SetTag<S: State = Empty>(PhantomData<fn() -> S>);
115115- impl<S: State> sealed::Sealed for SetTag<S> {}
116116- impl<S: State> State for SetTag<S> {
117117- type SubjectType = S::SubjectType;
118118- type Tag = Set<members::tag>;
119119- type Subject = S::Subject;
111111+ type Tag = S::Tag;
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 SubjectType = S::SubjectType;
126126- type Tag = S::Tag;
127118 type Subject = Set<members::subject>;
119119+ type Tag = S::Tag;
120120+ }
121121+ ///State transition - sets the `tag` field to Set
122122+ pub struct SetTag<S: State = Empty>(PhantomData<fn() -> S>);
123123+ impl<S: State> sealed::Sealed for SetTag<S> {}
124124+ impl<S: State> State for SetTag<S> {
125125+ type SubjectType = S::SubjectType;
126126+ type Subject = S::Subject;
127127+ type Tag = Set<members::tag>;
128128 }
129129 /// Marker types for field names
130130 #[allow(non_camel_case_types)]
131131 pub mod members {
132132 ///Marker type for the `subject_type` field
133133 pub struct subject_type(());
134134+ ///Marker type for the `subject` field
135135+ pub struct subject(());
134136 ///Marker type for the `tag` field
135137 pub struct tag(());
136136- ///Marker type for the `subject` field
137137- pub struct subject(());
138138 }
139139}
140140···228228where
229229 S: suggestion_state::State,
230230 S::SubjectType: suggestion_state::IsSet,
231231- S::Tag: suggestion_state::IsSet,
232231 S::Subject: suggestion_state::IsSet,
232232+ S::Tag: suggestion_state::IsSet,
233233{
234234 /// Build the final struct
235235 pub fn build(self) -> Suggestion<'a> {
+1
crates/weaver-api/src/blog_pckt.rs
···5566pub mod block;
77pub mod blog;
88+pub mod content;
89pub mod document;
910pub mod mark;
1011pub mod post;
+13-13
crates/weaver-api/src/blog_pckt/block/image.rs
···3434 }
3535 /// State trait tracking which required fields have been set
3636 pub trait State: sealed::Sealed {
3737- type Width;
3837 type Height;
3838+ type Width;
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 Width = Unset;
4544 type Height = Unset;
4646- }
4747- ///State transition - sets the `width` field to Set
4848- pub struct SetWidth<S: State = Empty>(PhantomData<fn() -> S>);
4949- impl<S: State> sealed::Sealed for SetWidth<S> {}
5050- impl<S: State> State for SetWidth<S> {
5151- type Width = Set<members::width>;
5252- type Height = S::Height;
4545+ type Width = Unset;
5346 }
5447 ///State transition - sets the `height` field to Set
5548 pub struct SetHeight<S: State = Empty>(PhantomData<fn() -> S>);
5649 impl<S: State> sealed::Sealed for SetHeight<S> {}
5750 impl<S: State> State for SetHeight<S> {
5858- type Width = S::Width;
5951 type Height = Set<members::height>;
5252+ type Width = S::Width;
5353+ }
5454+ ///State transition - sets the `width` field to Set
5555+ pub struct SetWidth<S: State = Empty>(PhantomData<fn() -> S>);
5656+ impl<S: State> sealed::Sealed for SetWidth<S> {}
5757+ impl<S: State> State for SetWidth<S> {
5858+ type Height = S::Height;
5959+ type Width = Set<members::width>;
6060 }
6161 /// Marker types for field names
6262 #[allow(non_camel_case_types)]
6363 pub mod members {
6464- ///Marker type for the `width` field
6565- pub struct width(());
6664 ///Marker type for the `height` field
6765 pub struct height(());
6666+ ///Marker type for the `width` field
6767+ pub struct width(());
6868 }
6969}
7070···134134impl<'a, S> AspectRatioBuilder<'a, S>
135135where
136136 S: aspect_ratio_state::State,
137137- S::Width: aspect_ratio_state::IsSet,
138137 S::Height: aspect_ratio_state::IsSet,
138138+ S::Width: aspect_ratio_state::IsSet,
139139{
140140 /// Build the final struct
141141 pub fn build(self) -> AspectRatio<'a> {
+13-13
crates/weaver-api/src/blog_pckt/block/mention.rs
···3535 }
3636 /// State trait tracking which required fields have been set
3737 pub trait State: sealed::Sealed {
3838- type Did;
3938 type Handle;
3939+ type Did;
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 Did = Unset;
4645 type Handle = Unset;
4747- }
4848- ///State transition - sets the `did` field to Set
4949- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
5050- impl<S: State> sealed::Sealed for SetDid<S> {}
5151- impl<S: State> State for SetDid<S> {
5252- type Did = Set<members::did>;
5353- type Handle = S::Handle;
4646+ type Did = Unset;
5447 }
5548 ///State transition - sets the `handle` field to Set
5649 pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
5750 impl<S: State> sealed::Sealed for SetHandle<S> {}
5851 impl<S: State> State for SetHandle<S> {
5959- type Did = S::Did;
6052 type Handle = Set<members::handle>;
5353+ type Did = S::Did;
5454+ }
5555+ ///State transition - sets the `did` field to Set
5656+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
5757+ impl<S: State> sealed::Sealed for SetDid<S> {}
5858+ impl<S: State> State for SetDid<S> {
5959+ type Handle = S::Handle;
6060+ type Did = Set<members::did>;
6161 }
6262 /// Marker types for field names
6363 #[allow(non_camel_case_types)]
6464 pub mod members {
6565- ///Marker type for the `did` field
6666- pub struct did(());
6765 ///Marker type for the `handle` field
6866 pub struct handle(());
6767+ ///Marker type for the `did` field
6868+ pub struct did(());
6969 }
7070}
7171···138138impl<'a, S> MentionBuilder<'a, S>
139139where
140140 S: mention_state::State,
141141- S::Did: mention_state::IsSet,
142141 S::Handle: mention_state::IsSet,
142142+ S::Did: mention_state::IsSet,
143143{
144144 /// Build the final struct
145145 pub fn build(self) -> Mention<'a> {
···3434 }
3535 /// State trait tracking which required fields have been set
3636 pub trait State: sealed::Sealed {
3737- type Content;
3837 type Checked;
3838+ type Content;
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 Content = Unset;
4544 type Checked = Unset;
4646- }
4747- ///State transition - sets the `content` field to Set
4848- pub struct SetContent<S: State = Empty>(PhantomData<fn() -> S>);
4949- impl<S: State> sealed::Sealed for SetContent<S> {}
5050- impl<S: State> State for SetContent<S> {
5151- type Content = Set<members::content>;
5252- type Checked = S::Checked;
4545+ type Content = Unset;
5346 }
5447 ///State transition - sets the `checked` field to Set
5548 pub struct SetChecked<S: State = Empty>(PhantomData<fn() -> S>);
5649 impl<S: State> sealed::Sealed for SetChecked<S> {}
5750 impl<S: State> State for SetChecked<S> {
5858- type Content = S::Content;
5951 type Checked = Set<members::checked>;
5252+ type Content = S::Content;
5353+ }
5454+ ///State transition - sets the `content` field to Set
5555+ pub struct SetContent<S: State = Empty>(PhantomData<fn() -> S>);
5656+ impl<S: State> sealed::Sealed for SetContent<S> {}
5757+ impl<S: State> State for SetContent<S> {
5858+ type Checked = S::Checked;
5959+ type Content = Set<members::content>;
6060 }
6161 /// Marker types for field names
6262 #[allow(non_camel_case_types)]
6363 pub mod members {
6464- ///Marker type for the `content` field
6565- pub struct content(());
6664 ///Marker type for the `checked` field
6765 pub struct checked(());
6666+ ///Marker type for the `content` field
6767+ pub struct content(());
6868 }
6969}
7070···137137impl<'a, S> TaskItemBuilder<'a, S>
138138where
139139 S: task_item_state::State,
140140- S::Content: task_item_state::IsSet,
141140 S::Checked: task_item_state::IsSet,
141141+ S::Content: task_item_state::IsSet,
142142{
143143 /// Build the final struct
144144 pub fn build(self) -> TaskItem<'a> {
+190
crates/weaver-api/src/blog_pckt/content.rs
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// Lexicon: blog.pckt.content
44+//
55+// This file was automatically generated from Lexicon schemas.
66+// Any manual changes will be overwritten on the next regeneration.
77+88+#[jacquard_derive::lexicon]
99+#[derive(
1010+ serde::Serialize,
1111+ serde::Deserialize,
1212+ Debug,
1313+ Clone,
1414+ PartialEq,
1515+ Eq,
1616+ jacquard_derive::IntoStatic
1717+)]
1818+#[serde(rename_all = "camelCase")]
1919+pub struct Content<'a> {
2020+ /// Array of content blocks
2121+ #[serde(borrow)]
2222+ pub items: Vec<jacquard_common::types::value::Data<'a>>,
2323+}
2424+2525+pub mod content_state {
2626+2727+ pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
2828+ #[allow(unused)]
2929+ use ::core::marker::PhantomData;
3030+ mod sealed {
3131+ pub trait Sealed {}
3232+ }
3333+ /// State trait tracking which required fields have been set
3434+ pub trait State: sealed::Sealed {
3535+ type Items;
3636+ }
3737+ /// Empty state - all required fields are unset
3838+ pub struct Empty(());
3939+ impl sealed::Sealed for Empty {}
4040+ impl State for Empty {
4141+ type Items = Unset;
4242+ }
4343+ ///State transition - sets the `items` field to Set
4444+ pub struct SetItems<S: State = Empty>(PhantomData<fn() -> S>);
4545+ impl<S: State> sealed::Sealed for SetItems<S> {}
4646+ impl<S: State> State for SetItems<S> {
4747+ type Items = Set<members::items>;
4848+ }
4949+ /// Marker types for field names
5050+ #[allow(non_camel_case_types)]
5151+ pub mod members {
5252+ ///Marker type for the `items` field
5353+ pub struct items(());
5454+ }
5555+}
5656+5757+/// Builder for constructing an instance of this type
5858+pub struct ContentBuilder<'a, S: content_state::State> {
5959+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
6060+ __unsafe_private_named: (
6161+ ::core::option::Option<Vec<jacquard_common::types::value::Data<'a>>>,
6262+ ),
6363+ _phantom: ::core::marker::PhantomData<&'a ()>,
6464+}
6565+6666+impl<'a> Content<'a> {
6767+ /// Create a new builder for this type
6868+ pub fn new() -> ContentBuilder<'a, content_state::Empty> {
6969+ ContentBuilder::new()
7070+ }
7171+}
7272+7373+impl<'a> ContentBuilder<'a, content_state::Empty> {
7474+ /// Create a new builder with all fields unset
7575+ pub fn new() -> Self {
7676+ ContentBuilder {
7777+ _phantom_state: ::core::marker::PhantomData,
7878+ __unsafe_private_named: (None,),
7979+ _phantom: ::core::marker::PhantomData,
8080+ }
8181+ }
8282+}
8383+8484+impl<'a, S> ContentBuilder<'a, S>
8585+where
8686+ S: content_state::State,
8787+ S::Items: content_state::IsUnset,
8888+{
8989+ /// Set the `items` field (required)
9090+ pub fn items(
9191+ mut self,
9292+ value: impl Into<Vec<jacquard_common::types::value::Data<'a>>>,
9393+ ) -> ContentBuilder<'a, content_state::SetItems<S>> {
9494+ self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
9595+ ContentBuilder {
9696+ _phantom_state: ::core::marker::PhantomData,
9797+ __unsafe_private_named: self.__unsafe_private_named,
9898+ _phantom: ::core::marker::PhantomData,
9999+ }
100100+ }
101101+}
102102+103103+impl<'a, S> ContentBuilder<'a, S>
104104+where
105105+ S: content_state::State,
106106+ S::Items: content_state::IsSet,
107107+{
108108+ /// Build the final struct
109109+ pub fn build(self) -> Content<'a> {
110110+ Content {
111111+ items: self.__unsafe_private_named.0.unwrap(),
112112+ extra_data: Default::default(),
113113+ }
114114+ }
115115+ /// Build the final struct with custom extra_data
116116+ pub fn build_with_data(
117117+ self,
118118+ extra_data: std::collections::BTreeMap<
119119+ jacquard_common::smol_str::SmolStr,
120120+ jacquard_common::types::value::Data<'a>,
121121+ >,
122122+ ) -> Content<'a> {
123123+ Content {
124124+ items: self.__unsafe_private_named.0.unwrap(),
125125+ extra_data: Some(extra_data),
126126+ }
127127+ }
128128+}
129129+130130+fn lexicon_doc_blog_pckt_content() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
131131+ ::jacquard_lexicon::lexicon::LexiconDoc {
132132+ lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
133133+ id: ::jacquard_common::CowStr::new_static("blog.pckt.content"),
134134+ revision: None,
135135+ description: None,
136136+ defs: {
137137+ let mut map = ::alloc::collections::BTreeMap::new();
138138+ map.insert(
139139+ ::jacquard_common::smol_str::SmolStr::new_static("main"),
140140+ ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
141141+ description: None,
142142+ required: Some(
143143+ vec![::jacquard_common::smol_str::SmolStr::new_static("items")],
144144+ ),
145145+ nullable: None,
146146+ properties: {
147147+ #[allow(unused_mut)]
148148+ let mut map = ::alloc::collections::BTreeMap::new();
149149+ map.insert(
150150+ ::jacquard_common::smol_str::SmolStr::new_static("items"),
151151+ ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
152152+ description: Some(
153153+ ::jacquard_common::CowStr::new_static(
154154+ "Array of content blocks",
155155+ ),
156156+ ),
157157+ items: ::jacquard_lexicon::lexicon::LexArrayItem::Union(::jacquard_lexicon::lexicon::LexRefUnion {
158158+ description: None,
159159+ refs: vec![],
160160+ closed: Some(false),
161161+ }),
162162+ min_length: None,
163163+ max_length: None,
164164+ }),
165165+ );
166166+ map
167167+ },
168168+ }),
169169+ );
170170+ map
171171+ },
172172+ }
173173+}
174174+175175+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Content<'a> {
176176+ fn nsid() -> &'static str {
177177+ "blog.pckt.content"
178178+ }
179179+ fn def_name() -> &'static str {
180180+ "main"
181181+ }
182182+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
183183+ lexicon_doc_blog_pckt_content()
184184+ }
185185+ fn validate(
186186+ &self,
187187+ ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
188188+ Ok(())
189189+ }
190190+}
+28-28
crates/weaver-api/src/blog_pckt/post.rs
···5353 }
5454 /// State trait tracking which required fields have been set
5555 pub trait State: sealed::Sealed {
5656- type Blog;
5656+ type Title;
5757 type Blocks;
5858+ type Blog;
5859 type Url;
5959- type Title;
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 Title = Unset;
6666+ type Blocks = Unset;
6567 type Blog = Unset;
6666- type Blocks = Unset;
6768 type Url = Unset;
6868- type Title = Unset;
6969 }
7070- ///State transition - sets the `blog` field to Set
7171- pub struct SetBlog<S: State = Empty>(PhantomData<fn() -> S>);
7272- impl<S: State> sealed::Sealed for SetBlog<S> {}
7373- impl<S: State> State for SetBlog<S> {
7474- type Blog = Set<members::blog>;
7070+ ///State transition - sets the `title` field to Set
7171+ pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
7272+ impl<S: State> sealed::Sealed for SetTitle<S> {}
7373+ impl<S: State> State for SetTitle<S> {
7474+ type Title = Set<members::title>;
7575 type Blocks = S::Blocks;
7676+ type Blog = S::Blog;
7677 type Url = S::Url;
7777- type Title = S::Title;
7878 }
7979 ///State transition - sets the `blocks` field to Set
8080 pub struct SetBlocks<S: State = Empty>(PhantomData<fn() -> S>);
8181 impl<S: State> sealed::Sealed for SetBlocks<S> {}
8282 impl<S: State> State for SetBlocks<S> {
8383+ type Title = S::Title;
8484+ type Blocks = Set<members::blocks>;
8385 type Blog = S::Blog;
8484- type Blocks = Set<members::blocks>;
8586 type Url = S::Url;
8787+ }
8888+ ///State transition - sets the `blog` field to Set
8989+ pub struct SetBlog<S: State = Empty>(PhantomData<fn() -> S>);
9090+ impl<S: State> sealed::Sealed for SetBlog<S> {}
9191+ impl<S: State> State for SetBlog<S> {
8692 type Title = S::Title;
9393+ type Blocks = S::Blocks;
9494+ type Blog = Set<members::blog>;
9595+ type Url = S::Url;
8796 }
8897 ///State transition - sets the `url` field to Set
8998 pub struct SetUrl<S: State = Empty>(PhantomData<fn() -> S>);
9099 impl<S: State> sealed::Sealed for SetUrl<S> {}
91100 impl<S: State> State for SetUrl<S> {
9292- type Blog = S::Blog;
9393- type Blocks = S::Blocks;
9494- type Url = Set<members::url>;
95101 type Title = S::Title;
9696- }
9797- ///State transition - sets the `title` field to Set
9898- pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
9999- impl<S: State> sealed::Sealed for SetTitle<S> {}
100100- impl<S: State> State for SetTitle<S> {
101101- type Blog = S::Blog;
102102 type Blocks = S::Blocks;
103103- type Url = S::Url;
104104- type Title = Set<members::title>;
103103+ type Blog = S::Blog;
104104+ type Url = Set<members::url>;
105105 }
106106 /// Marker types for field names
107107 #[allow(non_camel_case_types)]
108108 pub mod members {
109109- ///Marker type for the `blog` field
110110- pub struct blog(());
109109+ ///Marker type for the `title` field
110110+ pub struct title(());
111111 ///Marker type for the `blocks` field
112112 pub struct blocks(());
113113+ ///Marker type for the `blog` field
114114+ pub struct blog(());
113115 ///Marker type for the `url` field
114116 pub struct url(());
115115- ///Marker type for the `title` field
116116- pub struct title(());
117117 }
118118}
119119···357357impl<'a, S> PostBuilder<'a, S>
358358where
359359 S: post_state::State,
360360- S::Blog: post_state::IsSet,
360360+ S::Title: post_state::IsSet,
361361 S::Blocks: post_state::IsSet,
362362+ S::Blog: post_state::IsSet,
362363 S::Url: post_state::IsSet,
363363- S::Title: post_state::IsSet,
364364{
365365 /// Build the final struct
366366 pub fn build(self) -> Post<'a> {
+13-13
crates/weaver-api/src/blog_pckt/richtext/facet.rs
···552552 }
553553 /// State trait tracking which required fields have been set
554554 pub trait State: sealed::Sealed {
555555- type ByteEnd;
556555 type ByteStart;
556556+ type ByteEnd;
557557 }
558558 /// Empty state - all required fields are unset
559559 pub struct Empty(());
560560 impl sealed::Sealed for Empty {}
561561 impl State for Empty {
562562- type ByteEnd = Unset;
563562 type ByteStart = Unset;
564564- }
565565- ///State transition - sets the `byte_end` field to Set
566566- pub struct SetByteEnd<S: State = Empty>(PhantomData<fn() -> S>);
567567- impl<S: State> sealed::Sealed for SetByteEnd<S> {}
568568- impl<S: State> State for SetByteEnd<S> {
569569- type ByteEnd = Set<members::byte_end>;
570570- type ByteStart = S::ByteStart;
563563+ type ByteEnd = Unset;
571564 }
572565 ///State transition - sets the `byte_start` field to Set
573566 pub struct SetByteStart<S: State = Empty>(PhantomData<fn() -> S>);
574567 impl<S: State> sealed::Sealed for SetByteStart<S> {}
575568 impl<S: State> State for SetByteStart<S> {
576576- type ByteEnd = S::ByteEnd;
577569 type ByteStart = Set<members::byte_start>;
570570+ type ByteEnd = S::ByteEnd;
571571+ }
572572+ ///State transition - sets the `byte_end` field to Set
573573+ pub struct SetByteEnd<S: State = Empty>(PhantomData<fn() -> S>);
574574+ impl<S: State> sealed::Sealed for SetByteEnd<S> {}
575575+ impl<S: State> State for SetByteEnd<S> {
576576+ type ByteStart = S::ByteStart;
577577+ type ByteEnd = Set<members::byte_end>;
578578 }
579579 /// Marker types for field names
580580 #[allow(non_camel_case_types)]
581581 pub mod members {
582582- ///Marker type for the `byte_end` field
583583- pub struct byte_end(());
584582 ///Marker type for the `byte_start` field
585583 pub struct byte_start(());
584584+ ///Marker type for the `byte_end` field
585585+ pub struct byte_end(());
586586 }
587587}
588588···652652impl<'a, S> ByteSliceBuilder<'a, S>
653653where
654654 S: byte_slice_state::State,
655655- S::ByteEnd: byte_slice_state::IsSet,
656655 S::ByteStart: byte_slice_state::IsSet,
656656+ S::ByteEnd: byte_slice_state::IsSet,
657657{
658658 /// Build the final struct
659659 pub fn build(self) -> ByteSlice<'a> {
+165-165
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 Muted;
7170 type UnreadCount;
7272- type Rev;
7171+ type Id;
7372 type Members;
7373+ type Rev;
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 Id = Unset;
8079 type Muted = Unset;
8180 type UnreadCount = Unset;
8282- type Rev = Unset;
8181+ type Id = Unset;
8382 type Members = Unset;
8484- }
8585- ///State transition - sets the `id` field to Set
8686- pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
8787- impl<S: State> sealed::Sealed for SetId<S> {}
8888- impl<S: State> State for SetId<S> {
8989- type Id = Set<members::id>;
9090- type Muted = S::Muted;
9191- type UnreadCount = S::UnreadCount;
9292- type Rev = S::Rev;
9393- type Members = S::Members;
8383+ type Rev = Unset;
9484 }
9585 ///State transition - sets the `muted` field to Set
9686 pub struct SetMuted<S: State = Empty>(PhantomData<fn() -> S>);
9787 impl<S: State> sealed::Sealed for SetMuted<S> {}
9888 impl<S: State> State for SetMuted<S> {
9999- type Id = S::Id;
10089 type Muted = Set<members::muted>;
10190 type UnreadCount = S::UnreadCount;
9191+ type Id = S::Id;
9292+ type Members = S::Members;
10293 type Rev = S::Rev;
103103- type Members = S::Members;
10494 }
10595 ///State transition - sets the `unread_count` field to Set
10696 pub struct SetUnreadCount<S: State = Empty>(PhantomData<fn() -> S>);
10797 impl<S: State> sealed::Sealed for SetUnreadCount<S> {}
10898 impl<S: State> State for SetUnreadCount<S> {
109109- type Id = S::Id;
11099 type Muted = S::Muted;
111100 type UnreadCount = Set<members::unread_count>;
112112- type Rev = S::Rev;
101101+ type Id = S::Id;
113102 type Members = S::Members;
103103+ type Rev = S::Rev;
114104 }
115115- ///State transition - sets the `rev` field to Set
116116- pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
117117- impl<S: State> sealed::Sealed for SetRev<S> {}
118118- impl<S: State> State for SetRev<S> {
119119- type Id = S::Id;
105105+ ///State transition - sets the `id` field to Set
106106+ pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
107107+ impl<S: State> sealed::Sealed for SetId<S> {}
108108+ impl<S: State> State for SetId<S> {
120109 type Muted = S::Muted;
121110 type UnreadCount = S::UnreadCount;
122122- type Rev = Set<members::rev>;
111111+ type Id = Set<members::id>;
123112 type Members = S::Members;
113113+ type Rev = S::Rev;
124114 }
125115 ///State transition - sets the `members` field to Set
126116 pub struct SetMembers<S: State = Empty>(PhantomData<fn() -> S>);
127117 impl<S: State> sealed::Sealed for SetMembers<S> {}
128118 impl<S: State> State for SetMembers<S> {
129129- type Id = S::Id;
130119 type Muted = S::Muted;
131120 type UnreadCount = S::UnreadCount;
132132- type Rev = S::Rev;
121121+ type Id = S::Id;
133122 type Members = Set<members::members>;
123123+ type Rev = S::Rev;
124124+ }
125125+ ///State transition - sets the `rev` field to Set
126126+ pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
127127+ impl<S: State> sealed::Sealed for SetRev<S> {}
128128+ impl<S: State> State for SetRev<S> {
129129+ type Muted = S::Muted;
130130+ type UnreadCount = S::UnreadCount;
131131+ type Id = S::Id;
132132+ type Members = S::Members;
133133+ type Rev = Set<members::rev>;
134134 }
135135 /// Marker types for field names
136136 #[allow(non_camel_case_types)]
137137 pub mod members {
138138- ///Marker type for the `id` field
139139- pub struct id(());
140138 ///Marker type for the `muted` field
141139 pub struct muted(());
142140 ///Marker type for the `unread_count` field
143141 pub struct unread_count(());
142142+ ///Marker type for the `id` field
143143+ pub struct id(());
144144+ ///Marker type for the `members` field
145145+ pub struct members(());
144146 ///Marker type for the `rev` field
145147 pub struct rev(());
146146- ///Marker type for the `members` field
147147- pub struct members(());
148148 }
149149}
150150···331331impl<'a, S> ConvoViewBuilder<'a, S>
332332where
333333 S: convo_view_state::State,
334334- S::Id: convo_view_state::IsSet,
335334 S::Muted: convo_view_state::IsSet,
336335 S::UnreadCount: convo_view_state::IsSet,
337337- S::Rev: convo_view_state::IsSet,
336336+ S::Id: convo_view_state::IsSet,
338337 S::Members: convo_view_state::IsSet,
338338+ S::Rev: convo_view_state::IsSet,
339339{
340340 /// Build the final struct
341341 pub fn build(self) -> ConvoView<'a> {
···17331733 }
17341734 /// State trait tracking which required fields have been set
17351735 pub trait State: sealed::Sealed {
17361736- type Rev;
17371737- type Sender;
17381736 type Id;
17371737+ type Rev;
17391738 type SentAt;
17391739+ type Sender;
17401740 }
17411741 /// Empty state - all required fields are unset
17421742 pub struct Empty(());
17431743 impl sealed::Sealed for Empty {}
17441744 impl State for Empty {
17451745+ type Id = Unset;
17451746 type Rev = Unset;
17471747+ type SentAt = Unset;
17461748 type Sender = Unset;
17471747- type Id = Unset;
17481748- type SentAt = Unset;
17491749+ }
17501750+ ///State transition - sets the `id` field to Set
17511751+ pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
17521752+ impl<S: State> sealed::Sealed for SetId<S> {}
17531753+ impl<S: State> State for SetId<S> {
17541754+ type Id = Set<members::id>;
17551755+ type Rev = S::Rev;
17561756+ type SentAt = S::SentAt;
17571757+ type Sender = S::Sender;
17491758 }
17501759 ///State transition - sets the `rev` field to Set
17511760 pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
17521761 impl<S: State> sealed::Sealed for SetRev<S> {}
17531762 impl<S: State> State for SetRev<S> {
17631763+ type Id = S::Id;
17541764 type Rev = Set<members::rev>;
17651765+ type SentAt = S::SentAt;
17551766 type Sender = S::Sender;
17671767+ }
17681768+ ///State transition - sets the `sent_at` field to Set
17691769+ pub struct SetSentAt<S: State = Empty>(PhantomData<fn() -> S>);
17701770+ impl<S: State> sealed::Sealed for SetSentAt<S> {}
17711771+ impl<S: State> State for SetSentAt<S> {
17561772 type Id = S::Id;
17571757- type SentAt = S::SentAt;
17731773+ type Rev = S::Rev;
17741774+ type SentAt = Set<members::sent_at>;
17751775+ type Sender = S::Sender;
17581776 }
17591777 ///State transition - sets the `sender` field to Set
17601778 pub struct SetSender<S: State = Empty>(PhantomData<fn() -> S>);
17611779 impl<S: State> sealed::Sealed for SetSender<S> {}
17621780 impl<S: State> State for SetSender<S> {
17631763- type Rev = S::Rev;
17641764- type Sender = Set<members::sender>;
17651781 type Id = S::Id;
17661766- type SentAt = S::SentAt;
17671767- }
17681768- ///State transition - sets the `id` field to Set
17691769- pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
17701770- impl<S: State> sealed::Sealed for SetId<S> {}
17711771- impl<S: State> State for SetId<S> {
17721782 type Rev = S::Rev;
17731773- type Sender = S::Sender;
17741774- type Id = Set<members::id>;
17751783 type SentAt = S::SentAt;
17761776- }
17771777- ///State transition - sets the `sent_at` field to Set
17781778- pub struct SetSentAt<S: State = Empty>(PhantomData<fn() -> S>);
17791779- impl<S: State> sealed::Sealed for SetSentAt<S> {}
17801780- impl<S: State> State for SetSentAt<S> {
17811781- type Rev = S::Rev;
17821782- type Sender = S::Sender;
17831783- type Id = S::Id;
17841784- type SentAt = Set<members::sent_at>;
17841784+ type Sender = Set<members::sender>;
17851785 }
17861786 /// Marker types for field names
17871787 #[allow(non_camel_case_types)]
17881788 pub mod members {
17891789+ ///Marker type for the `id` field
17901790+ pub struct id(());
17891791 ///Marker type for the `rev` field
17901792 pub struct rev(());
17931793+ ///Marker type for the `sent_at` field
17941794+ pub struct sent_at(());
17911795 ///Marker type for the `sender` field
17921796 pub struct sender(());
17931793- ///Marker type for the `id` field
17941794- pub struct id(());
17951795- ///Marker type for the `sent_at` field
17961796- pub struct sent_at(());
17971797 }
17981798}
17991799···19061906impl<'a, S> DeletedMessageViewBuilder<'a, S>
19071907where
19081908 S: deleted_message_view_state::State,
19091909+ S::Id: deleted_message_view_state::IsSet,
19091910 S::Rev: deleted_message_view_state::IsSet,
19111911+ S::SentAt: deleted_message_view_state::IsSet,
19101912 S::Sender: deleted_message_view_state::IsSet,
19111911- S::Id: deleted_message_view_state::IsSet,
19121912- S::SentAt: deleted_message_view_state::IsSet,
19131913{
19141914 /// Build the final struct
19151915 pub fn build(self) -> DeletedMessageView<'a> {
···20242024 }
20252025 /// State trait tracking which required fields have been set
20262026 pub trait State: sealed::Sealed {
20272027- type Rev;
20282027 type ConvoId;
20292029- type Reaction;
20282028+ type Rev;
20302029 type Message;
20302030+ type Reaction;
20312031 }
20322032 /// Empty state - all required fields are unset
20332033 pub struct Empty(());
20342034 impl sealed::Sealed for Empty {}
20352035 impl State for Empty {
20362036- type Rev = Unset;
20372036 type ConvoId = Unset;
20382038- type Reaction = Unset;
20372037+ type Rev = Unset;
20392038 type Message = Unset;
20402040- }
20412041- ///State transition - sets the `rev` field to Set
20422042- pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
20432043- impl<S: State> sealed::Sealed for SetRev<S> {}
20442044- impl<S: State> State for SetRev<S> {
20452045- type Rev = Set<members::rev>;
20462046- type ConvoId = S::ConvoId;
20472047- type Reaction = S::Reaction;
20482048- type Message = S::Message;
20392039+ type Reaction = Unset;
20492040 }
20502041 ///State transition - sets the `convo_id` field to Set
20512042 pub struct SetConvoId<S: State = Empty>(PhantomData<fn() -> S>);
20522043 impl<S: State> sealed::Sealed for SetConvoId<S> {}
20532044 impl<S: State> State for SetConvoId<S> {
20452045+ type ConvoId = Set<members::convo_id>;
20542046 type Rev = S::Rev;
20552055- type ConvoId = Set<members::convo_id>;
20472047+ type Message = S::Message;
20562048 type Reaction = S::Reaction;
20572057- type Message = S::Message;
20582049 }
20592059- ///State transition - sets the `reaction` field to Set
20602060- pub struct SetReaction<S: State = Empty>(PhantomData<fn() -> S>);
20612061- impl<S: State> sealed::Sealed for SetReaction<S> {}
20622062- impl<S: State> State for SetReaction<S> {
20632063- type Rev = S::Rev;
20502050+ ///State transition - sets the `rev` field to Set
20512051+ pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
20522052+ impl<S: State> sealed::Sealed for SetRev<S> {}
20532053+ impl<S: State> State for SetRev<S> {
20642054 type ConvoId = S::ConvoId;
20652065- type Reaction = Set<members::reaction>;
20552055+ type Rev = Set<members::rev>;
20662056 type Message = S::Message;
20572057+ type Reaction = S::Reaction;
20672058 }
20682059 ///State transition - sets the `message` field to Set
20692060 pub struct SetMessage<S: State = Empty>(PhantomData<fn() -> S>);
20702061 impl<S: State> sealed::Sealed for SetMessage<S> {}
20712062 impl<S: State> State for SetMessage<S> {
20722072- type Rev = S::Rev;
20732063 type ConvoId = S::ConvoId;
20742074- type Reaction = S::Reaction;
20642064+ type Rev = S::Rev;
20752065 type Message = Set<members::message>;
20662066+ type Reaction = S::Reaction;
20672067+ }
20682068+ ///State transition - sets the `reaction` field to Set
20692069+ pub struct SetReaction<S: State = Empty>(PhantomData<fn() -> S>);
20702070+ impl<S: State> sealed::Sealed for SetReaction<S> {}
20712071+ impl<S: State> State for SetReaction<S> {
20722072+ type ConvoId = S::ConvoId;
20732073+ type Rev = S::Rev;
20742074+ type Message = S::Message;
20752075+ type Reaction = Set<members::reaction>;
20762076 }
20772077 /// Marker types for field names
20782078 #[allow(non_camel_case_types)]
20792079 pub mod members {
20802080+ ///Marker type for the `convo_id` field
20812081+ pub struct convo_id(());
20802082 ///Marker type for the `rev` field
20812083 pub struct rev(());
20822082- ///Marker type for the `convo_id` field
20832083- pub struct convo_id(());
20842084+ ///Marker type for the `message` field
20852085+ pub struct message(());
20842086 ///Marker type for the `reaction` field
20852087 pub struct reaction(());
20862086- ///Marker type for the `message` field
20872087- pub struct message(());
20882088 }
20892089}
20902090···21972197impl<'a, S> LogAddReactionBuilder<'a, S>
21982198where
21992199 S: log_add_reaction_state::State,
22002200- S::Rev: log_add_reaction_state::IsSet,
22012200 S::ConvoId: log_add_reaction_state::IsSet,
22022202- S::Reaction: log_add_reaction_state::IsSet,
22012201+ S::Rev: log_add_reaction_state::IsSet,
22032202 S::Message: log_add_reaction_state::IsSet,
22032203+ S::Reaction: log_add_reaction_state::IsSet,
22042204{
22052205 /// Build the final struct
22062206 pub fn build(self) -> LogAddReaction<'a> {
···23322332 }
23332333 /// State trait tracking which required fields have been set
23342334 pub trait State: sealed::Sealed {
23352335+ type Message;
23352336 type Rev;
23362337 type ConvoId;
23372337- type Message;
23382338 }
23392339 /// Empty state - all required fields are unset
23402340 pub struct Empty(());
23412341 impl sealed::Sealed for Empty {}
23422342 impl State for Empty {
23432343+ type Message = Unset;
23432344 type Rev = Unset;
23442345 type ConvoId = Unset;
23452345- type Message = Unset;
23462346+ }
23472347+ ///State transition - sets the `message` field to Set
23482348+ pub struct SetMessage<S: State = Empty>(PhantomData<fn() -> S>);
23492349+ impl<S: State> sealed::Sealed for SetMessage<S> {}
23502350+ impl<S: State> State for SetMessage<S> {
23512351+ type Message = Set<members::message>;
23522352+ type Rev = S::Rev;
23532353+ type ConvoId = S::ConvoId;
23462354 }
23472355 ///State transition - sets the `rev` field to Set
23482356 pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
23492357 impl<S: State> sealed::Sealed for SetRev<S> {}
23502358 impl<S: State> State for SetRev<S> {
23592359+ type Message = S::Message;
23512360 type Rev = Set<members::rev>;
23522361 type ConvoId = S::ConvoId;
23532353- type Message = S::Message;
23542362 }
23552363 ///State transition - sets the `convo_id` field to Set
23562364 pub struct SetConvoId<S: State = Empty>(PhantomData<fn() -> S>);
23572365 impl<S: State> sealed::Sealed for SetConvoId<S> {}
23582366 impl<S: State> State for SetConvoId<S> {
23672367+ type Message = S::Message;
23592368 type Rev = S::Rev;
23602369 type ConvoId = Set<members::convo_id>;
23612361- type Message = S::Message;
23622362- }
23632363- ///State transition - sets the `message` field to Set
23642364- pub struct SetMessage<S: State = Empty>(PhantomData<fn() -> S>);
23652365- impl<S: State> sealed::Sealed for SetMessage<S> {}
23662366- impl<S: State> State for SetMessage<S> {
23672367- type Rev = S::Rev;
23682368- type ConvoId = S::ConvoId;
23692369- type Message = Set<members::message>;
23702370 }
23712371 /// Marker types for field names
23722372 #[allow(non_camel_case_types)]
23732373 pub mod members {
23742374+ ///Marker type for the `message` field
23752375+ pub struct message(());
23742376 ///Marker type for the `rev` field
23752377 pub struct rev(());
23762378 ///Marker type for the `convo_id` field
23772379 pub struct convo_id(());
23782378- ///Marker type for the `message` field
23792379- pub struct message(());
23802380 }
23812381}
23822382···24692469impl<'a, S> LogCreateMessageBuilder<'a, S>
24702470where
24712471 S: log_create_message_state::State,
24722472+ S::Message: log_create_message_state::IsSet,
24722473 S::Rev: log_create_message_state::IsSet,
24732474 S::ConvoId: log_create_message_state::IsSet,
24742474- S::Message: log_create_message_state::IsSet,
24752475{
24762476 /// Build the final struct
24772477 pub fn build(self) -> LogCreateMessage<'a> {
···25652565 }
25662566 /// State trait tracking which required fields have been set
25672567 pub trait State: sealed::Sealed {
25682568- type Rev;
25692568 type ConvoId;
25692569+ type Rev;
25702570 type Message;
25712571 }
25722572 /// Empty state - all required fields are unset
25732573 pub struct Empty(());
25742574 impl sealed::Sealed for Empty {}
25752575 impl State for Empty {
25762576- type Rev = Unset;
25772576 type ConvoId = Unset;
25772577+ type Rev = Unset;
25782578 type Message = Unset;
25792579 }
25802580+ ///State transition - sets the `convo_id` field to Set
25812581+ pub struct SetConvoId<S: State = Empty>(PhantomData<fn() -> S>);
25822582+ impl<S: State> sealed::Sealed for SetConvoId<S> {}
25832583+ impl<S: State> State for SetConvoId<S> {
25842584+ type ConvoId = Set<members::convo_id>;
25852585+ type Rev = S::Rev;
25862586+ type Message = S::Message;
25872587+ }
25802588 ///State transition - sets the `rev` field to Set
25812589 pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
25822590 impl<S: State> sealed::Sealed for SetRev<S> {}
25832591 impl<S: State> State for SetRev<S> {
25922592+ type ConvoId = S::ConvoId;
25842593 type Rev = Set<members::rev>;
25852585- type ConvoId = S::ConvoId;
25862586- type Message = S::Message;
25872587- }
25882588- ///State transition - sets the `convo_id` field to Set
25892589- pub struct SetConvoId<S: State = Empty>(PhantomData<fn() -> S>);
25902590- impl<S: State> sealed::Sealed for SetConvoId<S> {}
25912591- impl<S: State> State for SetConvoId<S> {
25922592- type Rev = S::Rev;
25932593- type ConvoId = Set<members::convo_id>;
25942594 type Message = S::Message;
25952595 }
25962596 ///State transition - sets the `message` field to Set
25972597 pub struct SetMessage<S: State = Empty>(PhantomData<fn() -> S>);
25982598 impl<S: State> sealed::Sealed for SetMessage<S> {}
25992599 impl<S: State> State for SetMessage<S> {
26002600- type Rev = S::Rev;
26012600 type ConvoId = S::ConvoId;
26012601+ type Rev = S::Rev;
26022602 type Message = Set<members::message>;
26032603 }
26042604 /// Marker types for field names
26052605 #[allow(non_camel_case_types)]
26062606 pub mod members {
26072607+ ///Marker type for the `convo_id` field
26082608+ pub struct convo_id(());
26072609 ///Marker type for the `rev` field
26082610 pub struct rev(());
26092609- ///Marker type for the `convo_id` field
26102610- pub struct convo_id(());
26112611 ///Marker type for the `message` field
26122612 pub struct message(());
26132613 }
···27022702impl<'a, S> LogDeleteMessageBuilder<'a, S>
27032703where
27042704 S: log_delete_message_state::State,
27052705- S::Rev: log_delete_message_state::IsSet,
27062705 S::ConvoId: log_delete_message_state::IsSet,
27062706+ S::Rev: log_delete_message_state::IsSet,
27072707 S::Message: log_delete_message_state::IsSet,
27082708{
27092709 /// Build the final struct
···31053105 }
31063106 /// State trait tracking which required fields have been set
31073107 pub trait State: sealed::Sealed {
31083108- type Reaction;
31093109- type ConvoId;
31103108 type Rev;
31113109 type Message;
31103110+ type Reaction;
31113111+ type ConvoId;
31123112 }
31133113 /// Empty state - all required fields are unset
31143114 pub struct Empty(());
31153115 impl sealed::Sealed for Empty {}
31163116 impl State for Empty {
31173117+ type Rev = Unset;
31183118+ type Message = Unset;
31173119 type Reaction = Unset;
31183120 type ConvoId = Unset;
31193119- type Rev = Unset;
31203120- type Message = Unset;
31213121- }
31223122- ///State transition - sets the `reaction` field to Set
31233123- pub struct SetReaction<S: State = Empty>(PhantomData<fn() -> S>);
31243124- impl<S: State> sealed::Sealed for SetReaction<S> {}
31253125- impl<S: State> State for SetReaction<S> {
31263126- type Reaction = Set<members::reaction>;
31273127- type ConvoId = S::ConvoId;
31283128- type Rev = S::Rev;
31293129- type Message = S::Message;
31303130- }
31313131- ///State transition - sets the `convo_id` field to Set
31323132- pub struct SetConvoId<S: State = Empty>(PhantomData<fn() -> S>);
31333133- impl<S: State> sealed::Sealed for SetConvoId<S> {}
31343134- impl<S: State> State for SetConvoId<S> {
31353135- type Reaction = S::Reaction;
31363136- type ConvoId = Set<members::convo_id>;
31373137- type Rev = S::Rev;
31383138- type Message = S::Message;
31393121 }
31403122 ///State transition - sets the `rev` field to Set
31413123 pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
31423124 impl<S: State> sealed::Sealed for SetRev<S> {}
31433125 impl<S: State> State for SetRev<S> {
31263126+ type Rev = Set<members::rev>;
31273127+ type Message = S::Message;
31443128 type Reaction = S::Reaction;
31453129 type ConvoId = S::ConvoId;
31463146- type Rev = Set<members::rev>;
31473147- type Message = S::Message;
31483130 }
31493131 ///State transition - sets the `message` field to Set
31503132 pub struct SetMessage<S: State = Empty>(PhantomData<fn() -> S>);
31513133 impl<S: State> sealed::Sealed for SetMessage<S> {}
31523134 impl<S: State> State for SetMessage<S> {
31353135+ type Rev = S::Rev;
31363136+ type Message = Set<members::message>;
31533137 type Reaction = S::Reaction;
31543138 type ConvoId = S::ConvoId;
31393139+ }
31403140+ ///State transition - sets the `reaction` field to Set
31413141+ pub struct SetReaction<S: State = Empty>(PhantomData<fn() -> S>);
31423142+ impl<S: State> sealed::Sealed for SetReaction<S> {}
31433143+ impl<S: State> State for SetReaction<S> {
31553144 type Rev = S::Rev;
31563156- type Message = Set<members::message>;
31453145+ type Message = S::Message;
31463146+ type Reaction = Set<members::reaction>;
31473147+ type ConvoId = S::ConvoId;
31483148+ }
31493149+ ///State transition - sets the `convo_id` field to Set
31503150+ pub struct SetConvoId<S: State = Empty>(PhantomData<fn() -> S>);
31513151+ impl<S: State> sealed::Sealed for SetConvoId<S> {}
31523152+ impl<S: State> State for SetConvoId<S> {
31533153+ type Rev = S::Rev;
31543154+ type Message = S::Message;
31553155+ type Reaction = S::Reaction;
31563156+ type ConvoId = Set<members::convo_id>;
31573157 }
31583158 /// Marker types for field names
31593159 #[allow(non_camel_case_types)]
31603160 pub mod members {
31613161+ ///Marker type for the `rev` field
31623162+ pub struct rev(());
31633163+ ///Marker type for the `message` field
31643164+ pub struct message(());
31613165 ///Marker type for the `reaction` field
31623166 pub struct reaction(());
31633167 ///Marker type for the `convo_id` field
31643168 pub struct convo_id(());
31653165- ///Marker type for the `rev` field
31663166- pub struct rev(());
31673167- ///Marker type for the `message` field
31683168- pub struct message(());
31693169 }
31703170}
31713171···32783278impl<'a, S> LogRemoveReactionBuilder<'a, S>
32793279where
32803280 S: log_remove_reaction_state::State,
32813281+ S::Rev: log_remove_reaction_state::IsSet,
32823282+ S::Message: log_remove_reaction_state::IsSet,
32813283 S::Reaction: log_remove_reaction_state::IsSet,
32823284 S::ConvoId: log_remove_reaction_state::IsSet,
32833283- S::Rev: log_remove_reaction_state::IsSet,
32843284- S::Message: log_remove_reaction_state::IsSet,
32853285{
32863286 /// Build the final struct
32873287 pub fn build(self) -> LogRemoveReaction<'a> {
···34113411 }
34123412 /// State trait tracking which required fields have been set
34133413 pub trait State: sealed::Sealed {
34143414- type Message;
34153414 type Reaction;
34153415+ type Message;
34163416 }
34173417 /// Empty state - all required fields are unset
34183418 pub struct Empty(());
34193419 impl sealed::Sealed for Empty {}
34203420 impl State for Empty {
34213421+ type Reaction = Unset;
34213422 type Message = Unset;
34223422- type Reaction = Unset;
34233423+ }
34243424+ ///State transition - sets the `reaction` field to Set
34253425+ pub struct SetReaction<S: State = Empty>(PhantomData<fn() -> S>);
34263426+ impl<S: State> sealed::Sealed for SetReaction<S> {}
34273427+ impl<S: State> State for SetReaction<S> {
34283428+ type Reaction = Set<members::reaction>;
34293429+ type Message = S::Message;
34233430 }
34243431 ///State transition - sets the `message` field to Set
34253432 pub struct SetMessage<S: State = Empty>(PhantomData<fn() -> S>);
34263433 impl<S: State> sealed::Sealed for SetMessage<S> {}
34273434 impl<S: State> State for SetMessage<S> {
34283428- type Message = Set<members::message>;
34293435 type Reaction = S::Reaction;
34303430- }
34313431- ///State transition - sets the `reaction` field to Set
34323432- pub struct SetReaction<S: State = Empty>(PhantomData<fn() -> S>);
34333433- impl<S: State> sealed::Sealed for SetReaction<S> {}
34343434- impl<S: State> State for SetReaction<S> {
34353435- type Message = S::Message;
34363436- type Reaction = Set<members::reaction>;
34363436+ type Message = Set<members::message>;
34373437 }
34383438 /// Marker types for field names
34393439 #[allow(non_camel_case_types)]
34403440 pub mod members {
34413441+ ///Marker type for the `reaction` field
34423442+ pub struct reaction(());
34413443 ///Marker type for the `message` field
34423444 pub struct message(());
34433443- ///Marker type for the `reaction` field
34443444- pub struct reaction(());
34453445 }
34463446}
34473447···35233523impl<'a, S> MessageAndReactionViewBuilder<'a, S>
35243524where
35253525 S: message_and_reaction_view_state::State,
35263526- S::Message: message_and_reaction_view_state::IsSet,
35273526 S::Reaction: message_and_reaction_view_state::IsSet,
35273527+ S::Message: message_and_reaction_view_state::IsSet,
35283528{
35293529 /// Build the final struct
35303530 pub fn build(self) -> MessageAndReactionView<'a> {
···185185 }
186186 /// State trait tracking which required fields have been set
187187 pub trait State: sealed::Sealed {
188188- type MessagesReceived;
189188 type ConvosStarted;
190189 type Convos;
191190 type MessagesSent;
191191+ type MessagesReceived;
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 MessagesReceived = Unset;
198197 type ConvosStarted = Unset;
199198 type Convos = Unset;
200199 type MessagesSent = Unset;
201201- }
202202- ///State transition - sets the `messages_received` field to Set
203203- pub struct SetMessagesReceived<S: State = Empty>(PhantomData<fn() -> S>);
204204- impl<S: State> sealed::Sealed for SetMessagesReceived<S> {}
205205- impl<S: State> State for SetMessagesReceived<S> {
206206- type MessagesReceived = Set<members::messages_received>;
207207- type ConvosStarted = S::ConvosStarted;
208208- type Convos = S::Convos;
209209- type MessagesSent = S::MessagesSent;
200200+ type MessagesReceived = Unset;
210201 }
211202 ///State transition - sets the `convos_started` field to Set
212203 pub struct SetConvosStarted<S: State = Empty>(PhantomData<fn() -> S>);
213204 impl<S: State> sealed::Sealed for SetConvosStarted<S> {}
214205 impl<S: State> State for SetConvosStarted<S> {
215215- type MessagesReceived = S::MessagesReceived;
216206 type ConvosStarted = Set<members::convos_started>;
217207 type Convos = S::Convos;
218208 type MessagesSent = S::MessagesSent;
209209+ type MessagesReceived = S::MessagesReceived;
219210 }
220211 ///State transition - sets the `convos` field to Set
221212 pub struct SetConvos<S: State = Empty>(PhantomData<fn() -> S>);
222213 impl<S: State> sealed::Sealed for SetConvos<S> {}
223214 impl<S: State> State for SetConvos<S> {
224224- type MessagesReceived = S::MessagesReceived;
225215 type ConvosStarted = S::ConvosStarted;
226216 type Convos = Set<members::convos>;
227217 type MessagesSent = S::MessagesSent;
218218+ type MessagesReceived = S::MessagesReceived;
228219 }
229220 ///State transition - sets the `messages_sent` field to Set
230221 pub struct SetMessagesSent<S: State = Empty>(PhantomData<fn() -> S>);
231222 impl<S: State> sealed::Sealed for SetMessagesSent<S> {}
232223 impl<S: State> State for SetMessagesSent<S> {
233233- type MessagesReceived = S::MessagesReceived;
234224 type ConvosStarted = S::ConvosStarted;
235225 type Convos = S::Convos;
236226 type MessagesSent = Set<members::messages_sent>;
227227+ type MessagesReceived = S::MessagesReceived;
228228+ }
229229+ ///State transition - sets the `messages_received` field to Set
230230+ pub struct SetMessagesReceived<S: State = Empty>(PhantomData<fn() -> S>);
231231+ impl<S: State> sealed::Sealed for SetMessagesReceived<S> {}
232232+ impl<S: State> State for SetMessagesReceived<S> {
233233+ type ConvosStarted = S::ConvosStarted;
234234+ type Convos = S::Convos;
235235+ type MessagesSent = S::MessagesSent;
236236+ type MessagesReceived = Set<members::messages_received>;
237237 }
238238 /// Marker types for field names
239239 #[allow(non_camel_case_types)]
240240 pub mod members {
241241- ///Marker type for the `messages_received` field
242242- pub struct messages_received(());
243241 ///Marker type for the `convos_started` field
244242 pub struct convos_started(());
245243 ///Marker type for the `convos` field
246244 pub struct convos(());
247245 ///Marker type for the `messages_sent` field
248246 pub struct messages_sent(());
247247+ ///Marker type for the `messages_received` field
248248+ pub struct messages_received(());
249249 }
250250}
251251···358358impl<'a, S> MetadataBuilder<'a, S>
359359where
360360 S: metadata_state::State,
361361- S::MessagesReceived: metadata_state::IsSet,
362361 S::ConvosStarted: metadata_state::IsSet,
363362 S::Convos: metadata_state::IsSet,
364363 S::MessagesSent: metadata_state::IsSet,
364364+ S::MessagesReceived: metadata_state::IsSet,
365365{
366366 /// Build the final struct
367367 pub fn build(self) -> Metadata<'a> {
+13-13
crates/weaver-api/src/com_atproto/admin.rs
···907907 }
908908 /// State trait tracking which required fields have been set
909909 pub trait State: sealed::Sealed {
910910- type Cid;
911910 type Did;
911911+ type Cid;
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 Cid = Unset;
918917 type Did = Unset;
919919- }
920920- ///State transition - sets the `cid` field to Set
921921- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
922922- impl<S: State> sealed::Sealed for SetCid<S> {}
923923- impl<S: State> State for SetCid<S> {
924924- type Cid = Set<members::cid>;
925925- type Did = S::Did;
918918+ type Cid = Unset;
926919 }
927920 ///State transition - sets the `did` field to Set
928921 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
929922 impl<S: State> sealed::Sealed for SetDid<S> {}
930923 impl<S: State> State for SetDid<S> {
931931- type Cid = S::Cid;
932924 type Did = Set<members::did>;
925925+ type Cid = S::Cid;
926926+ }
927927+ ///State transition - sets the `cid` field to Set
928928+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
929929+ impl<S: State> sealed::Sealed for SetCid<S> {}
930930+ impl<S: State> State for SetCid<S> {
931931+ type Did = S::Did;
932932+ type Cid = Set<members::cid>;
933933 }
934934 /// Marker types for field names
935935 #[allow(non_camel_case_types)]
936936 pub mod members {
937937- ///Marker type for the `cid` field
938938- pub struct cid(());
939937 ///Marker type for the `did` field
940938 pub struct did(());
939939+ ///Marker type for the `cid` field
940940+ pub struct cid(());
941941 }
942942}
943943···10301030impl<'a, S> RepoBlobRefBuilder<'a, S>
10311031where
10321032 S: repo_blob_ref_state::State,
10331033- S::Cid: repo_blob_ref_state::IsSet,
10341033 S::Did: repo_blob_ref_state::IsSet,
10341034+ S::Cid: 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 RecipientDid;
4645 type SenderDid;
4646+ type RecipientDid;
4747 type Content;
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 RecipientDid = Unset;
5453 type SenderDid = Unset;
5454+ type RecipientDid = Unset;
5555 type Content = Unset;
5656 }
5757- ///State transition - sets the `recipient_did` field to Set
5858- pub struct SetRecipientDid<S: State = Empty>(PhantomData<fn() -> S>);
5959- impl<S: State> sealed::Sealed for SetRecipientDid<S> {}
6060- impl<S: State> State for SetRecipientDid<S> {
6161- type RecipientDid = Set<members::recipient_did>;
6262- type SenderDid = S::SenderDid;
6363- type Content = S::Content;
6464- }
6557 ///State transition - sets the `sender_did` field to Set
6658 pub struct SetSenderDid<S: State = Empty>(PhantomData<fn() -> S>);
6759 impl<S: State> sealed::Sealed for SetSenderDid<S> {}
6860 impl<S: State> State for SetSenderDid<S> {
6969- type RecipientDid = S::RecipientDid;
7061 type SenderDid = Set<members::sender_did>;
6262+ type RecipientDid = S::RecipientDid;
6363+ type Content = S::Content;
6464+ }
6565+ ///State transition - sets the `recipient_did` field to Set
6666+ pub struct SetRecipientDid<S: State = Empty>(PhantomData<fn() -> S>);
6767+ impl<S: State> sealed::Sealed for SetRecipientDid<S> {}
6868+ impl<S: State> State for SetRecipientDid<S> {
6969+ type SenderDid = S::SenderDid;
7070+ type RecipientDid = Set<members::recipient_did>;
7171 type Content = S::Content;
7272 }
7373 ///State transition - sets the `content` field to Set
7474 pub struct SetContent<S: State = Empty>(PhantomData<fn() -> S>);
7575 impl<S: State> sealed::Sealed for SetContent<S> {}
7676 impl<S: State> State for SetContent<S> {
7777- type RecipientDid = S::RecipientDid;
7877 type SenderDid = S::SenderDid;
7878+ type RecipientDid = S::RecipientDid;
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(());
8686- ///Marker type for the `sender_did` field
8787- pub struct sender_did(());
8888 ///Marker type for the `content` field
8989 pub struct content(());
9090 }
···213213impl<'a, S> SendEmailBuilder<'a, S>
214214where
215215 S: send_email_state::State,
216216- S::RecipientDid: send_email_state::IsSet,
217216 S::SenderDid: send_email_state::IsSet,
217217+ S::RecipientDid: send_email_state::IsSet,
218218 S::Content: send_email_state::IsSet,
219219{
220220 /// Build the final struct
···3333 }
3434 /// State trait tracking which required fields have been set
3535 pub trait State: sealed::Sealed {
3636- type Password;
3736 type Did;
3737+ type Password;
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 Password = Unset;
4443 type Did = Unset;
4545- }
4646- ///State transition - sets the `password` field to Set
4747- pub struct SetPassword<S: State = Empty>(PhantomData<fn() -> S>);
4848- impl<S: State> sealed::Sealed for SetPassword<S> {}
4949- impl<S: State> State for SetPassword<S> {
5050- type Password = Set<members::password>;
5151- type Did = S::Did;
4444+ type Password = Unset;
5245 }
5346 ///State transition - sets the `did` field to Set
5447 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
5548 impl<S: State> sealed::Sealed for SetDid<S> {}
5649 impl<S: State> State for SetDid<S> {
5757- type Password = S::Password;
5850 type Did = Set<members::did>;
5151+ type Password = S::Password;
5252+ }
5353+ ///State transition - sets the `password` field to Set
5454+ pub struct SetPassword<S: State = Empty>(PhantomData<fn() -> S>);
5555+ impl<S: State> sealed::Sealed for SetPassword<S> {}
5656+ impl<S: State> State for SetPassword<S> {
5757+ type Did = S::Did;
5858+ type Password = Set<members::password>;
5959 }
6060 /// Marker types for field names
6161 #[allow(non_camel_case_types)]
6262 pub mod members {
6363- ///Marker type for the `password` field
6464- pub struct password(());
6563 ///Marker type for the `did` field
6664 pub struct did(());
6565+ ///Marker type for the `password` field
6666+ pub struct password(());
6767 }
6868}
6969···142142impl<'a, S> UpdateAccountPasswordBuilder<'a, S>
143143where
144144 S: update_account_password_state::State,
145145- S::Password: update_account_password_state::IsSet,
146145 S::Did: update_account_password_state::IsSet,
146146+ S::Password: update_account_password_state::IsSet,
147147{
148148 /// Build the final struct
149149 pub fn build(self) -> UpdateAccountPassword<'a> {
+15-15
crates/weaver-api/src/com_atproto/identity.rs
···4747 }
4848 /// State trait tracking which required fields have been set
4949 pub trait State: sealed::Sealed {
5050- type DidDoc;
5150 type Handle;
5151+ type DidDoc;
5252 type Did;
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 DidDoc = Unset;
5958 type Handle = Unset;
5959+ type DidDoc = Unset;
6060 type Did = Unset;
6161 }
6262- ///State transition - sets the `did_doc` field to Set
6363- pub struct SetDidDoc<S: State = Empty>(PhantomData<fn() -> S>);
6464- impl<S: State> sealed::Sealed for SetDidDoc<S> {}
6565- impl<S: State> State for SetDidDoc<S> {
6666- type DidDoc = Set<members::did_doc>;
6767- type Handle = S::Handle;
6868- type Did = S::Did;
6969- }
7062 ///State transition - sets the `handle` field to Set
7163 pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
7264 impl<S: State> sealed::Sealed for SetHandle<S> {}
7365 impl<S: State> State for SetHandle<S> {
7474- type DidDoc = S::DidDoc;
7566 type Handle = Set<members::handle>;
6767+ type DidDoc = S::DidDoc;
6868+ type Did = S::Did;
6969+ }
7070+ ///State transition - sets the `did_doc` field to Set
7171+ pub struct SetDidDoc<S: State = Empty>(PhantomData<fn() -> S>);
7272+ impl<S: State> sealed::Sealed for SetDidDoc<S> {}
7373+ impl<S: State> State for SetDidDoc<S> {
7474+ type Handle = S::Handle;
7575+ type DidDoc = Set<members::did_doc>;
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 DidDoc = S::DidDoc;
8382 type Handle = S::Handle;
8383+ type DidDoc = S::DidDoc;
8484 type Did = Set<members::did>;
8585 }
8686 /// Marker types for field names
8787 #[allow(non_camel_case_types)]
8888 pub mod members {
8989+ ///Marker type for the `handle` field
9090+ pub struct handle(());
8991 ///Marker type for the `did_doc` field
9092 pub struct did_doc(());
9191- ///Marker type for the `handle` field
9292- pub struct handle(());
9393 ///Marker type for the `did` field
9494 pub struct did(());
9595 }
···184184impl<'a, S> IdentityInfoBuilder<'a, S>
185185where
186186 S: identity_info_state::State,
187187- S::DidDoc: identity_info_state::IsSet,
188187 S::Handle: identity_info_state::IsSet,
188188+ S::DidDoc: identity_info_state::IsSet,
189189 S::Did: identity_info_state::IsSet,
190190{
191191 /// Build the final struct
+80-80
crates/weaver-api/src/com_atproto/label.rs
···6363 }
6464 /// State trait tracking which required fields have been set
6565 pub trait State: sealed::Sealed {
6666+ type Val;
6767+ type Src;
6868+ type Cts;
6669 type Uri;
6767- type Cts;
6868- type Src;
6969- type Val;
7070 }
7171 /// Empty state - all required fields are unset
7272 pub struct Empty(());
7373 impl sealed::Sealed for Empty {}
7474 impl State for Empty {
7575- type Uri = Unset;
7676- type Cts = Unset;
7777- type Src = Unset;
7875 type Val = Unset;
7676+ type Src = Unset;
7777+ type Cts = Unset;
7878+ type Uri = Unset;
7979 }
8080- ///State transition - sets the `uri` field to Set
8181- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
8282- impl<S: State> sealed::Sealed for SetUri<S> {}
8383- impl<S: State> State for SetUri<S> {
8484- type Uri = Set<members::uri>;
8585- type Cts = S::Cts;
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>;
8685 type Src = S::Src;
8787- type Val = S::Val;
8888- }
8989- ///State transition - sets the `cts` field to Set
9090- pub struct SetCts<S: State = Empty>(PhantomData<fn() -> S>);
9191- impl<S: State> sealed::Sealed for SetCts<S> {}
9292- impl<S: State> State for SetCts<S> {
8686+ type Cts = S::Cts;
9387 type Uri = S::Uri;
9494- type Cts = Set<members::cts>;
9595- type Src = S::Src;
9696- type Val = S::Val;
9788 }
9889 ///State transition - sets the `src` field to Set
9990 pub struct SetSrc<S: State = Empty>(PhantomData<fn() -> S>);
10091 impl<S: State> sealed::Sealed for SetSrc<S> {}
10192 impl<S: State> State for SetSrc<S> {
102102- type Uri = S::Uri;
103103- type Cts = S::Cts;
104104- type Src = Set<members::src>;
10593 type Val = S::Val;
9494+ type Src = Set<members::src>;
9595+ type Cts = S::Cts;
9696+ type Uri = S::Uri;
10697 }
107107- ///State transition - sets the `val` field to Set
108108- pub struct SetVal<S: State = Empty>(PhantomData<fn() -> S>);
109109- impl<S: State> sealed::Sealed for SetVal<S> {}
110110- impl<S: State> State for SetVal<S> {
9898+ ///State transition - sets the `cts` field to Set
9999+ pub struct SetCts<S: State = Empty>(PhantomData<fn() -> S>);
100100+ impl<S: State> sealed::Sealed for SetCts<S> {}
101101+ impl<S: State> State for SetCts<S> {
102102+ type Val = S::Val;
103103+ type Src = S::Src;
104104+ type Cts = Set<members::cts>;
111105 type Uri = S::Uri;
112112- type Cts = S::Cts;
106106+ }
107107+ ///State transition - sets the `uri` field to Set
108108+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
109109+ impl<S: State> sealed::Sealed for SetUri<S> {}
110110+ impl<S: State> State for SetUri<S> {
111111+ type Val = S::Val;
113112 type Src = S::Src;
114114- type Val = Set<members::val>;
113113+ type Cts = S::Cts;
114114+ type Uri = Set<members::uri>;
115115 }
116116 /// Marker types for field names
117117 #[allow(non_camel_case_types)]
118118 pub mod members {
119119- ///Marker type for the `uri` field
120120- pub struct uri(());
121121- ///Marker type for the `cts` field
122122- pub struct cts(());
119119+ ///Marker type for the `val` field
120120+ pub struct val(());
123121 ///Marker type for the `src` field
124122 pub struct src(());
125125- ///Marker type for the `val` field
126126- pub struct val(());
123123+ ///Marker type for the `cts` field
124124+ pub struct cts(());
125125+ ///Marker type for the `uri` field
126126+ pub struct uri(());
127127 }
128128}
129129···328328impl<'a, S> LabelBuilder<'a, S>
329329where
330330 S: label_state::State,
331331- S::Uri: label_state::IsSet,
332332- S::Cts: label_state::IsSet,
333333- S::Src: label_state::IsSet,
334331 S::Val: label_state::IsSet,
332332+ S::Src: label_state::IsSet,
333333+ S::Cts: label_state::IsSet,
334334+ S::Uri: label_state::IsSet,
335335{
336336 /// Build the final struct
337337 pub fn build(self) -> Label<'a> {
···10591059 }
10601060 /// State trait tracking which required fields have been set
10611061 pub trait State: sealed::Sealed {
10621062- type Severity;
10631063- type Identifier;
10641062 type Blurs;
10631063+ type Identifier;
10641064+ type Severity;
10651065 type Locales;
10661066 }
10671067 /// Empty state - all required fields are unset
10681068 pub struct Empty(());
10691069 impl sealed::Sealed for Empty {}
10701070 impl State for Empty {
10711071- type Severity = Unset;
10721072- type Identifier = Unset;
10731071 type Blurs = Unset;
10721072+ type Identifier = Unset;
10731073+ type Severity = Unset;
10741074 type Locales = Unset;
10751075 }
10761076- ///State transition - sets the `severity` field to Set
10771077- pub struct SetSeverity<S: State = Empty>(PhantomData<fn() -> S>);
10781078- impl<S: State> sealed::Sealed for SetSeverity<S> {}
10791079- impl<S: State> State for SetSeverity<S> {
10801080- type Severity = Set<members::severity>;
10761076+ ///State transition - sets the `blurs` field to Set
10771077+ pub struct SetBlurs<S: State = Empty>(PhantomData<fn() -> S>);
10781078+ impl<S: State> sealed::Sealed for SetBlurs<S> {}
10791079+ impl<S: State> State for SetBlurs<S> {
10801080+ type Blurs = Set<members::blurs>;
10811081 type Identifier = S::Identifier;
10821082- type Blurs = S::Blurs;
10821082+ type Severity = S::Severity;
10831083 type Locales = S::Locales;
10841084 }
10851085 ///State transition - sets the `identifier` field to Set
10861086 pub struct SetIdentifier<S: State = Empty>(PhantomData<fn() -> S>);
10871087 impl<S: State> sealed::Sealed for SetIdentifier<S> {}
10881088 impl<S: State> State for SetIdentifier<S> {
10891089+ type Blurs = S::Blurs;
10901090+ type Identifier = Set<members::identifier>;
10891091 type Severity = S::Severity;
10901090- type Identifier = Set<members::identifier>;
10911091- type Blurs = S::Blurs;
10921092 type Locales = S::Locales;
10931093 }
10941094- ///State transition - sets the `blurs` field to Set
10951095- pub struct SetBlurs<S: State = Empty>(PhantomData<fn() -> S>);
10961096- impl<S: State> sealed::Sealed for SetBlurs<S> {}
10971097- impl<S: State> State for SetBlurs<S> {
10981098- type Severity = S::Severity;
10941094+ ///State transition - sets the `severity` field to Set
10951095+ pub struct SetSeverity<S: State = Empty>(PhantomData<fn() -> S>);
10961096+ impl<S: State> sealed::Sealed for SetSeverity<S> {}
10971097+ impl<S: State> State for SetSeverity<S> {
10981098+ type Blurs = S::Blurs;
10991099 type Identifier = S::Identifier;
11001100- type Blurs = Set<members::blurs>;
11001100+ type Severity = Set<members::severity>;
11011101 type Locales = S::Locales;
11021102 }
11031103 ///State transition - sets the `locales` field to Set
11041104 pub struct SetLocales<S: State = Empty>(PhantomData<fn() -> S>);
11051105 impl<S: State> sealed::Sealed for SetLocales<S> {}
11061106 impl<S: State> State for SetLocales<S> {
11071107- type Severity = S::Severity;
11071107+ type Blurs = S::Blurs;
11081108 type Identifier = S::Identifier;
11091109- type Blurs = S::Blurs;
11091109+ type Severity = S::Severity;
11101110 type Locales = Set<members::locales>;
11111111 }
11121112 /// Marker types for field names
11131113 #[allow(non_camel_case_types)]
11141114 pub mod members {
11151115+ ///Marker type for the `blurs` field
11161116+ pub struct blurs(());
11171117+ ///Marker type for the `identifier` field
11181118+ pub struct identifier(());
11151119 ///Marker type for the `severity` field
11161120 pub struct severity(());
11171117- ///Marker type for the `identifier` field
11181118- pub struct identifier(());
11191119- ///Marker type for the `blurs` field
11201120- pub struct blurs(());
11211121 ///Marker type for the `locales` field
11221122 pub struct locales(());
11231123 }
···12741274impl<'a, S> LabelValueDefinitionBuilder<'a, S>
12751275where
12761276 S: label_value_definition_state::State,
12771277- S::Severity: label_value_definition_state::IsSet,
12781278- S::Identifier: label_value_definition_state::IsSet,
12791277 S::Blurs: label_value_definition_state::IsSet,
12781278+ S::Identifier: label_value_definition_state::IsSet,
12791279+ S::Severity: label_value_definition_state::IsSet,
12801280 S::Locales: label_value_definition_state::IsSet,
12811281{
12821282 /// Build the final struct
···16871687 }
16881688 /// State trait tracking which required fields have been set
16891689 pub trait State: sealed::Sealed {
16901690- type Name;
16911690 type Lang;
16921691 type Description;
16921692+ type Name;
16931693 }
16941694 /// Empty state - all required fields are unset
16951695 pub struct Empty(());
16961696 impl sealed::Sealed for Empty {}
16971697 impl State for Empty {
16981698- type Name = Unset;
16991698 type Lang = Unset;
17001699 type Description = Unset;
17011701- }
17021702- ///State transition - sets the `name` field to Set
17031703- pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
17041704- impl<S: State> sealed::Sealed for SetName<S> {}
17051705- impl<S: State> State for SetName<S> {
17061706- type Name = Set<members::name>;
17071707- type Lang = S::Lang;
17081708- type Description = S::Description;
17001700+ type Name = Unset;
17091701 }
17101702 ///State transition - sets the `lang` field to Set
17111703 pub struct SetLang<S: State = Empty>(PhantomData<fn() -> S>);
17121704 impl<S: State> sealed::Sealed for SetLang<S> {}
17131705 impl<S: State> State for SetLang<S> {
17141714- type Name = S::Name;
17151706 type Lang = Set<members::lang>;
17161707 type Description = S::Description;
17081708+ type Name = S::Name;
17171709 }
17181710 ///State transition - sets the `description` field to Set
17191711 pub struct SetDescription<S: State = Empty>(PhantomData<fn() -> S>);
17201712 impl<S: State> sealed::Sealed for SetDescription<S> {}
17211713 impl<S: State> State for SetDescription<S> {
17221722- type Name = S::Name;
17231714 type Lang = S::Lang;
17241715 type Description = Set<members::description>;
17161716+ type Name = S::Name;
17171717+ }
17181718+ ///State transition - sets the `name` field to Set
17191719+ pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
17201720+ impl<S: State> sealed::Sealed for SetName<S> {}
17211721+ impl<S: State> State for SetName<S> {
17221722+ type Lang = S::Lang;
17231723+ type Description = S::Description;
17241724+ type Name = Set<members::name>;
17251725 }
17261726 /// Marker types for field names
17271727 #[allow(non_camel_case_types)]
17281728 pub mod members {
17291729- ///Marker type for the `name` field
17301730- pub struct name(());
17311729 ///Marker type for the `lang` field
17321730 pub struct lang(());
17331731 ///Marker type for the `description` field
17341732 pub struct description(());
17331733+ ///Marker type for the `name` field
17341734+ pub struct name(());
17351735 }
17361736}
17371737···18411841impl<'a, S> LabelValueDefinitionStringsBuilder<'a, S>
18421842where
18431843 S: label_value_definition_strings_state::State,
18441844- S::Name: label_value_definition_strings_state::IsSet,
18451844 S::Lang: label_value_definition_strings_state::IsSet,
18461845 S::Description: label_value_definition_strings_state::IsSet,
18461846+ S::Name: label_value_definition_strings_state::IsSet,
18471847{
18481848 /// Build the final struct
18491849 pub fn build(self) -> LabelValueDefinitionStrings<'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> {
+13-13
crates/weaver-api/src/com_atproto/repo.rs
···4444 }
4545 /// State trait tracking which required fields have been set
4646 pub trait State: sealed::Sealed {
4747- type Cid;
4847 type Rev;
4848+ type Cid;
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 Cid = Unset;
5554 type Rev = Unset;
5656- }
5757- ///State transition - sets the `cid` field to Set
5858- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
5959- impl<S: State> sealed::Sealed for SetCid<S> {}
6060- impl<S: State> State for SetCid<S> {
6161- type Cid = Set<members::cid>;
6262- type Rev = S::Rev;
5555+ type Cid = Unset;
6356 }
6457 ///State transition - sets the `rev` field to Set
6558 pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
6659 impl<S: State> sealed::Sealed for SetRev<S> {}
6760 impl<S: State> State for SetRev<S> {
6868- type Cid = S::Cid;
6961 type Rev = Set<members::rev>;
6262+ type Cid = S::Cid;
6363+ }
6464+ ///State transition - sets the `cid` field to Set
6565+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
6666+ impl<S: State> sealed::Sealed for SetCid<S> {}
6767+ impl<S: State> State for SetCid<S> {
6868+ type Rev = S::Rev;
6969+ type Cid = Set<members::cid>;
7070 }
7171 /// Marker types for field names
7272 #[allow(non_camel_case_types)]
7373 pub mod members {
7474- ///Marker type for the `cid` field
7575- pub struct cid(());
7674 ///Marker type for the `rev` field
7775 pub struct rev(());
7676+ ///Marker type for the `cid` field
7777+ pub struct cid(());
7878 }
7979}
8080···147147impl<'a, S> CommitMetaBuilder<'a, S>
148148where
149149 S: commit_meta_state::State,
150150- S::Cid: commit_meta_state::IsSet,
151150 S::Rev: commit_meta_state::IsSet,
151151+ S::Cid: commit_meta_state::IsSet,
152152{
153153 /// Build the final struct
154154 pub fn build(self) -> CommitMeta<'a> {
···12411241 }
12421242 /// State trait tracking which required fields have been set
12431243 pub trait State: sealed::Sealed {
12441244- type Writes;
12451244 type Repo;
12451245+ type Writes;
12461246 }
12471247 /// Empty state - all required fields are unset
12481248 pub struct Empty(());
12491249 impl sealed::Sealed for Empty {}
12501250 impl State for Empty {
12511251- type Writes = Unset;
12521251 type Repo = Unset;
12531253- }
12541254- ///State transition - sets the `writes` field to Set
12551255- pub struct SetWrites<S: State = Empty>(PhantomData<fn() -> S>);
12561256- impl<S: State> sealed::Sealed for SetWrites<S> {}
12571257- impl<S: State> State for SetWrites<S> {
12581258- type Writes = Set<members::writes>;
12591259- type Repo = S::Repo;
12521252+ type Writes = Unset;
12601253 }
12611254 ///State transition - sets the `repo` field to Set
12621255 pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
12631256 impl<S: State> sealed::Sealed for SetRepo<S> {}
12641257 impl<S: State> State for SetRepo<S> {
12651265- type Writes = S::Writes;
12661258 type Repo = Set<members::repo>;
12591259+ type Writes = S::Writes;
12601260+ }
12611261+ ///State transition - sets the `writes` field to Set
12621262+ pub struct SetWrites<S: State = Empty>(PhantomData<fn() -> S>);
12631263+ impl<S: State> sealed::Sealed for SetWrites<S> {}
12641264+ impl<S: State> State for SetWrites<S> {
12651265+ type Repo = S::Repo;
12661266+ type Writes = Set<members::writes>;
12671267 }
12681268 /// Marker types for field names
12691269 #[allow(non_camel_case_types)]
12701270 pub mod members {
12711271- ///Marker type for the `writes` field
12721272- pub struct writes(());
12731271 ///Marker type for the `repo` field
12741272 pub struct repo(());
12731273+ ///Marker type for the `writes` field
12741274+ pub struct writes(());
12751275 }
12761276}
12771277···13781378impl<'a, S> ApplyWritesBuilder<'a, S>
13791379where
13801380 S: apply_writes_state::State,
13811381- S::Writes: apply_writes_state::IsSet,
13821381 S::Repo: apply_writes_state::IsSet,
13821382+ S::Writes: apply_writes_state::IsSet,
13831383{
13841384 /// Build the final struct
13851385 pub fn build(self) -> ApplyWrites<'a> {
···15691569 /// State trait tracking which required fields have been set
15701570 pub trait State: sealed::Sealed {
15711571 type Collection;
15721572- type Rkey;
15731572 type Value;
15731573+ type Rkey;
15741574 }
15751575 /// Empty state - all required fields are unset
15761576 pub struct Empty(());
15771577 impl sealed::Sealed for Empty {}
15781578 impl State for Empty {
15791579 type Collection = Unset;
15801580- type Rkey = Unset;
15811580 type Value = Unset;
15811581+ type Rkey = Unset;
15821582 }
15831583 ///State transition - sets the `collection` field to Set
15841584 pub struct SetCollection<S: State = Empty>(PhantomData<fn() -> S>);
15851585 impl<S: State> sealed::Sealed for SetCollection<S> {}
15861586 impl<S: State> State for SetCollection<S> {
15871587 type Collection = Set<members::collection>;
15881588- type Rkey = S::Rkey;
15891588 type Value = S::Value;
15901590- }
15911591- ///State transition - sets the `rkey` field to Set
15921592- pub struct SetRkey<S: State = Empty>(PhantomData<fn() -> S>);
15931593- impl<S: State> sealed::Sealed for SetRkey<S> {}
15941594- impl<S: State> State for SetRkey<S> {
15951595- type Collection = S::Collection;
15961596- type Rkey = Set<members::rkey>;
15971597- type Value = S::Value;
15891589+ type Rkey = S::Rkey;
15981590 }
15991591 ///State transition - sets the `value` field to Set
16001592 pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
16011593 impl<S: State> sealed::Sealed for SetValue<S> {}
16021594 impl<S: State> State for SetValue<S> {
16031595 type Collection = S::Collection;
16041604- type Rkey = S::Rkey;
16051596 type Value = Set<members::value>;
15971597+ type Rkey = S::Rkey;
15981598+ }
15991599+ ///State transition - sets the `rkey` field to Set
16001600+ pub struct SetRkey<S: State = Empty>(PhantomData<fn() -> S>);
16011601+ impl<S: State> sealed::Sealed for SetRkey<S> {}
16021602+ impl<S: State> State for SetRkey<S> {
16031603+ type Collection = S::Collection;
16041604+ type Value = S::Value;
16051605+ type Rkey = Set<members::rkey>;
16061606 }
16071607 /// Marker types for field names
16081608 #[allow(non_camel_case_types)]
16091609 pub mod members {
16101610 ///Marker type for the `collection` field
16111611 pub struct collection(());
16121612- ///Marker type for the `rkey` field
16131613- pub struct rkey(());
16141612 ///Marker type for the `value` field
16151613 pub struct value(());
16141614+ ///Marker type for the `rkey` field
16151615+ pub struct rkey(());
16161616 }
16171617}
16181618···17141714where
17151715 S: update_state::State,
17161716 S::Collection: update_state::IsSet,
17171717- S::Rkey: update_state::IsSet,
17181717 S::Value: update_state::IsSet,
17181718+ S::Rkey: update_state::IsSet,
17191719{
17201720 /// Build the final struct
17211721 pub fn build(self) -> Update<'a> {
···5353 }
5454 /// State trait tracking which required fields have been set
5555 pub trait State: sealed::Sealed {
5656+ type Collection;
5657 type Record;
5758 type Repo;
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 Collection = Unset;
6465 type Record = Unset;
6566 type Repo = Unset;
6666- type Collection = Unset;
6767+ }
6868+ ///State transition - sets the `collection` field to Set
6969+ pub struct SetCollection<S: State = Empty>(PhantomData<fn() -> S>);
7070+ impl<S: State> sealed::Sealed for SetCollection<S> {}
7171+ impl<S: State> State for SetCollection<S> {
7272+ type Collection = Set<members::collection>;
7373+ type Record = S::Record;
7474+ type Repo = S::Repo;
6775 }
6876 ///State transition - sets the `record` field to Set
6977 pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
7078 impl<S: State> sealed::Sealed for SetRecord<S> {}
7179 impl<S: State> State for SetRecord<S> {
8080+ type Collection = S::Collection;
7281 type Record = Set<members::record>;
7382 type Repo = S::Repo;
7474- type Collection = S::Collection;
7583 }
7684 ///State transition - sets the `repo` field to Set
7785 pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
7886 impl<S: State> sealed::Sealed for SetRepo<S> {}
7987 impl<S: State> State for SetRepo<S> {
8080- type Record = S::Record;
8181- type Repo = Set<members::repo>;
8288 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> {
8889 type Record = S::Record;
8989- type Repo = S::Repo;
9090- type Collection = Set<members::collection>;
9090+ type Repo = Set<members::repo>;
9191 }
9292 /// Marker types for field names
9393 #[allow(non_camel_case_types)]
9494 pub mod members {
9595+ ///Marker type for the `collection` field
9696+ pub struct collection(());
9597 ///Marker type for the `record` field
9698 pub struct record(());
9799 ///Marker type for the `repo` field
98100 pub struct repo(());
9999- ///Marker type for the `collection` field
100100- pub struct collection(());
101101 }
102102}
103103···258258impl<'a, S> CreateRecordBuilder<'a, S>
259259where
260260 S: create_record_state::State,
261261+ S::Collection: create_record_state::IsSet,
261262 S::Record: create_record_state::IsSet,
262263 S::Repo: 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;
5352 type Rkey;
5353+ type Repo;
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;
6160 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;
6161+ type Repo = Unset;
7062 }
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>;
7768 type Rkey = S::Rkey;
6969+ type Repo = S::Repo;
7870 }
7971 ///State transition - sets the `rkey` field to Set
8072 pub struct SetRkey<S: State = Empty>(PhantomData<fn() -> S>);
8173 impl<S: State> sealed::Sealed for SetRkey<S> {}
8274 impl<S: State> State for SetRkey<S> {
8383- type Repo = S::Repo;
8475 type Collection = S::Collection;
8576 type Rkey = Set<members::rkey>;
7777+ type Repo = S::Repo;
7878+ }
7979+ ///State transition - sets the `repo` field to Set
8080+ pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
8181+ impl<S: State> sealed::Sealed for SetRepo<S> {}
8282+ impl<S: State> State for SetRepo<S> {
8383+ type Collection = S::Collection;
8484+ type Rkey = S::Rkey;
8585+ type Repo = Set<members::repo>;
8686 }
8787 /// Marker types for field names
8888 #[allow(non_camel_case_types)]
8989 pub mod members {
9090- ///Marker type for the `repo` field
9191- pub struct repo(());
9290 ///Marker type for the `collection` field
9391 pub struct collection(());
9492 ///Marker type for the `rkey` field
9593 pub struct rkey(());
9494+ ///Marker type for the `repo` field
9595+ pub struct repo(());
9696 }
9797}
9898···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,
238237 S::Rkey: delete_record_state::IsSet,
238238+ S::Repo: delete_record_state::IsSet,
239239{
240240 /// Build the final struct
241241 pub fn build(self) -> DeleteRecord<'a> {
···3939 }
4040 /// State trait tracking which required fields have been set
4141 pub trait State: sealed::Sealed {
4242- type Rkey;
4342 type Collection;
4443 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 Rkey = Unset;
5150 type Collection = Unset;
5251 type Repo = Unset;
5353- }
5454- ///State transition - sets the `rkey` field to Set
5555- pub struct SetRkey<S: State = Empty>(PhantomData<fn() -> S>);
5656- impl<S: State> sealed::Sealed for SetRkey<S> {}
5757- impl<S: State> State for SetRkey<S> {
5858- type Rkey = Set<members::rkey>;
5959- type Collection = S::Collection;
6060- type Repo = S::Repo;
5252+ type Rkey = Unset;
6153 }
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 Rkey = S::Rkey;
6758 type Collection = Set<members::collection>;
6859 type Repo = S::Repo;
6060+ type Rkey = S::Rkey;
6961 }
7062 ///State transition - sets the `repo` field to Set
7163 pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
7264 impl<S: State> sealed::Sealed for SetRepo<S> {}
7365 impl<S: State> State for SetRepo<S> {
7474- type Rkey = S::Rkey;
7566 type Collection = S::Collection;
7667 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 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 `rkey` field
8282- pub struct rkey(());
8381 ///Marker type for the `collection` field
8482 pub struct collection(());
8583 ///Marker type for the `repo` field
8684 pub struct repo(());
8585+ ///Marker type for the `rkey` field
8686+ pub struct rkey(());
8787 }
8888}
8989···204204impl<'a, S> GetRecordBuilder<'a, S>
205205where
206206 S: get_record_state::State,
207207- S::Rkey: get_record_state::IsSet,
208207 S::Collection: get_record_state::IsSet,
209208 S::Repo: get_record_state::IsSet,
209209+ S::Rkey: get_record_state::IsSet,
210210{
211211 /// Build the final struct
212212 pub fn build(self) -> GetRecord<'a> {
···279279 /// State trait tracking which required fields have been set
280280 pub trait State: sealed::Sealed {
281281 type Uri;
282282- type Cid;
283282 type Value;
283283+ type Cid;
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;
290290- type Cid = Unset;
291290 type Value = Unset;
291291+ type Cid = 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;
299298 type Value = S::Value;
300300- }
301301- ///State transition - sets the `cid` field to Set
302302- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
303303- impl<S: State> sealed::Sealed for SetCid<S> {}
304304- impl<S: State> State for SetCid<S> {
305305- type Uri = S::Uri;
306306- type Cid = Set<members::cid>;
307307- type Value = S::Value;
299299+ type Cid = S::Cid;
308300 }
309301 ///State transition - sets the `value` field to Set
310302 pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
311303 impl<S: State> sealed::Sealed for SetValue<S> {}
312304 impl<S: State> State for SetValue<S> {
313305 type Uri = S::Uri;
314314- type Cid = S::Cid;
315306 type Value = Set<members::value>;
307307+ type Cid = S::Cid;
308308+ }
309309+ ///State transition - sets the `cid` field to Set
310310+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
311311+ impl<S: State> sealed::Sealed for SetCid<S> {}
312312+ impl<S: State> State for SetCid<S> {
313313+ type Uri = S::Uri;
314314+ type Value = S::Value;
315315+ type Cid = Set<members::cid>;
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(());
322322+ ///Marker type for the `value` field
323323+ pub struct value(());
322324 ///Marker type for the `cid` field
323325 pub struct cid(());
324324- ///Marker type for the `value` field
325325- pub struct value(());
326326 }
327327}
328328···416416where
417417 S: record_state::State,
418418 S::Uri: record_state::IsSet,
419419- S::Cid: record_state::IsSet,
420419 S::Value: record_state::IsSet,
420420+ S::Cid: record_state::IsSet,
421421{
422422 /// Build the final struct
423423 pub fn build(self) -> Record<'a> {
···5656 pub trait State: sealed::Sealed {
5757 type Record;
5858 type Repo;
5959- type Collection;
6059 type Rkey;
6060+ type Collection;
6161 }
6262 /// Empty state - all required fields are unset
6363 pub struct Empty(());
···6565 impl State for Empty {
6666 type Record = Unset;
6767 type Repo = Unset;
6868- type Collection = Unset;
6968 type Rkey = Unset;
6969+ type Collection = Unset;
7070 }
7171 ///State transition - sets the `record` field to Set
7272 pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
···7474 impl<S: State> State for SetRecord<S> {
7575 type Record = Set<members::record>;
7676 type Repo = S::Repo;
7777- type Collection = S::Collection;
7877 type Rkey = S::Rkey;
7878+ type Collection = S::Collection;
7979 }
8080 ///State transition - sets the `repo` field to Set
8181 pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
···8383 impl<S: State> State for SetRepo<S> {
8484 type Record = S::Record;
8585 type Repo = Set<members::repo>;
8686- type Collection = S::Collection;
8787- type Rkey = S::Rkey;
8888- }
8989- ///State transition - sets the `collection` field to Set
9090- pub struct SetCollection<S: State = Empty>(PhantomData<fn() -> S>);
9191- impl<S: State> sealed::Sealed for SetCollection<S> {}
9292- impl<S: State> State for SetCollection<S> {
9393- type Record = S::Record;
9494- type Repo = S::Repo;
9595- type Collection = Set<members::collection>;
9686 type Rkey = S::Rkey;
8787+ type Collection = S::Collection;
9788 }
9889 ///State transition - sets the `rkey` field to Set
9990 pub struct SetRkey<S: State = Empty>(PhantomData<fn() -> S>);
···10192 impl<S: State> State for SetRkey<S> {
10293 type Record = S::Record;
10394 type Repo = S::Repo;
104104- type Collection = S::Collection;
10595 type Rkey = Set<members::rkey>;
9696+ type Collection = S::Collection;
9797+ }
9898+ ///State transition - sets the `collection` field to Set
9999+ pub struct SetCollection<S: State = Empty>(PhantomData<fn() -> S>);
100100+ impl<S: State> sealed::Sealed for SetCollection<S> {}
101101+ impl<S: State> State for SetCollection<S> {
102102+ type Record = S::Record;
103103+ type Repo = S::Repo;
104104+ type Rkey = S::Rkey;
105105+ type Collection = Set<members::collection>;
106106 }
107107 /// Marker types for field names
108108 #[allow(non_camel_case_types)]
···111111 pub struct record(());
112112 ///Marker type for the `repo` field
113113 pub struct repo(());
114114+ ///Marker type for the `rkey` field
115115+ pub struct rkey(());
114116 ///Marker type for the `collection` field
115117 pub struct collection(());
116116- ///Marker type for the `rkey` field
117117- pub struct rkey(());
118118 }
119119}
120120···291291 S: put_record_state::State,
292292 S::Record: put_record_state::IsSet,
293293 S::Repo: put_record_state::IsSet,
294294- S::Collection: put_record_state::IsSet,
295294 S::Rkey: put_record_state::IsSet,
295295+ S::Collection: put_record_state::IsSet,
296296{
297297 /// Build the final struct
298298 pub fn build(self) -> PutRecord<'a> {
···3333 }
3434 /// State trait tracking which required fields have been set
3535 pub trait State: sealed::Sealed {
3636- type Uri;
3736 type Cid;
3737+ type Uri;
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 Uri = Unset;
4443 type Cid = Unset;
4545- }
4646- ///State transition - sets the `uri` field to Set
4747- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
4848- impl<S: State> sealed::Sealed for SetUri<S> {}
4949- impl<S: State> State for SetUri<S> {
5050- type Uri = Set<members::uri>;
5151- type Cid = S::Cid;
4444+ type Uri = Unset;
5245 }
5346 ///State transition - sets the `cid` field to Set
5447 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
5548 impl<S: State> sealed::Sealed for SetCid<S> {}
5649 impl<S: State> State for SetCid<S> {
5757- type Uri = S::Uri;
5850 type Cid = Set<members::cid>;
5151+ type Uri = S::Uri;
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 Cid = S::Cid;
5858+ type Uri = Set<members::uri>;
5959 }
6060 /// Marker types for field names
6161 #[allow(non_camel_case_types)]
6262 pub mod members {
6363- ///Marker type for the `uri` field
6464- pub struct uri(());
6563 ///Marker type for the `cid` field
6664 pub struct cid(());
6565+ ///Marker type for the `uri` field
6666+ pub struct uri(());
6767 }
6868}
6969···136136impl<'a, S> StrongRefBuilder<'a, S>
137137where
138138 S: strong_ref_state::State,
139139- S::Uri: strong_ref_state::IsSet,
140139 S::Cid: strong_ref_state::IsSet,
140140+ S::Uri: strong_ref_state::IsSet,
141141{
142142 /// Build the final struct
143143 pub fn build(self) -> StrongRef<'a> {
+74-74
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 ForAccount;
7070+ type CreatedBy;
7171+ type Uses;
6972 type Available;
7373+ type Disabled;
7074 type CreatedAt;
7175 type Code;
7272- type Uses;
7373- type Disabled;
7474- type CreatedBy;
7575- type ForAccount;
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 ForAccount = Unset;
8282+ type CreatedBy = Unset;
8383+ type Uses = Unset;
8184 type Available = Unset;
8585+ type Disabled = Unset;
8286 type CreatedAt = Unset;
8387 type Code = Unset;
8484- type Uses = Unset;
8585- type Disabled = Unset;
8686- type CreatedBy = Unset;
8787- type ForAccount = Unset;
8888 }
8989- ///State transition - sets the `available` field to Set
9090- pub struct SetAvailable<S: State = Empty>(PhantomData<fn() -> S>);
9191- impl<S: State> sealed::Sealed for SetAvailable<S> {}
9292- impl<S: State> State for SetAvailable<S> {
9393- type Available = Set<members::available>;
9494- type CreatedAt = S::CreatedAt;
9595- type Code = S::Code;
9696- type Uses = S::Uses;
9797- type Disabled = S::Disabled;
8989+ ///State transition - sets the `for_account` field to Set
9090+ pub struct SetForAccount<S: State = Empty>(PhantomData<fn() -> S>);
9191+ impl<S: State> sealed::Sealed for SetForAccount<S> {}
9292+ impl<S: State> State for SetForAccount<S> {
9393+ type ForAccount = Set<members::for_account>;
9894 type CreatedBy = S::CreatedBy;
9999- type ForAccount = S::ForAccount;
100100- }
101101- ///State transition - sets the `created_at` field to Set
102102- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
103103- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
104104- impl<S: State> State for SetCreatedAt<S> {
9595+ type Uses = S::Uses;
10596 type Available = S::Available;
106106- type CreatedAt = Set<members::created_at>;
9797+ type Disabled = S::Disabled;
9898+ type CreatedAt = S::CreatedAt;
10799 type Code = S::Code;
100100+ }
101101+ ///State transition - sets the `created_by` field to Set
102102+ pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
103103+ impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
104104+ impl<S: State> State for SetCreatedBy<S> {
105105+ type ForAccount = S::ForAccount;
106106+ type CreatedBy = Set<members::created_by>;
108107 type Uses = S::Uses;
108108+ type Available = S::Available;
109109 type Disabled = S::Disabled;
110110- type CreatedBy = S::CreatedBy;
111111- type ForAccount = S::ForAccount;
112112- }
113113- ///State transition - sets the `code` field to Set
114114- pub struct SetCode<S: State = Empty>(PhantomData<fn() -> S>);
115115- impl<S: State> sealed::Sealed for SetCode<S> {}
116116- impl<S: State> State for SetCode<S> {
117117- type Available = S::Available;
118110 type CreatedAt = S::CreatedAt;
119119- type Code = Set<members::code>;
120120- type Uses = S::Uses;
121121- type Disabled = S::Disabled;
122122- type CreatedBy = S::CreatedBy;
123123- type ForAccount = S::ForAccount;
111111+ type Code = S::Code;
124112 }
125113 ///State transition - sets the `uses` field to Set
126114 pub struct SetUses<S: State = Empty>(PhantomData<fn() -> S>);
127115 impl<S: State> sealed::Sealed for SetUses<S> {}
128116 impl<S: State> State for SetUses<S> {
117117+ type ForAccount = S::ForAccount;
118118+ type CreatedBy = S::CreatedBy;
119119+ type Uses = Set<members::uses>;
129120 type Available = S::Available;
121121+ type Disabled = S::Disabled;
130122 type CreatedAt = S::CreatedAt;
131123 type Code = S::Code;
132132- type Uses = Set<members::uses>;
133133- type Disabled = S::Disabled;
134134- type CreatedBy = S::CreatedBy;
124124+ }
125125+ ///State transition - sets the `available` field to Set
126126+ pub struct SetAvailable<S: State = Empty>(PhantomData<fn() -> S>);
127127+ impl<S: State> sealed::Sealed for SetAvailable<S> {}
128128+ impl<S: State> State for SetAvailable<S> {
135129 type ForAccount = S::ForAccount;
130130+ type CreatedBy = S::CreatedBy;
131131+ type Uses = S::Uses;
132132+ type Available = Set<members::available>;
133133+ type Disabled = S::Disabled;
134134+ type CreatedAt = S::CreatedAt;
135135+ type Code = S::Code;
136136 }
137137 ///State transition - sets the `disabled` field to Set
138138 pub struct SetDisabled<S: State = Empty>(PhantomData<fn() -> S>);
139139 impl<S: State> sealed::Sealed for SetDisabled<S> {}
140140 impl<S: State> State for SetDisabled<S> {
141141+ type ForAccount = S::ForAccount;
142142+ type CreatedBy = S::CreatedBy;
143143+ type Uses = S::Uses;
141144 type Available = S::Available;
142142- type CreatedAt = S::CreatedAt;
143143- type Code = S::Code;
144144- type Uses = S::Uses;
145145 type Disabled = Set<members::disabled>;
146146- type CreatedBy = S::CreatedBy;
147147- type ForAccount = S::ForAccount;
148148- }
149149- ///State transition - sets the `created_by` field to Set
150150- pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
151151- impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
152152- impl<S: State> State for SetCreatedBy<S> {
153153- type Available = S::Available;
154146 type CreatedAt = S::CreatedAt;
155147 type Code = S::Code;
156156- type Uses = S::Uses;
157157- type Disabled = S::Disabled;
158158- type CreatedBy = Set<members::created_by>;
159159- type ForAccount = S::ForAccount;
160148 }
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> {
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 ForAccount = S::ForAccount;
154154+ type CreatedBy = S::CreatedBy;
155155+ type Uses = S::Uses;
165156 type Available = S::Available;
166166- type CreatedAt = S::CreatedAt;
157157+ type Disabled = S::Disabled;
158158+ type CreatedAt = Set<members::created_at>;
167159 type Code = S::Code;
160160+ }
161161+ ///State transition - sets the `code` field to Set
162162+ pub struct SetCode<S: State = Empty>(PhantomData<fn() -> S>);
163163+ impl<S: State> sealed::Sealed for SetCode<S> {}
164164+ impl<S: State> State for SetCode<S> {
165165+ type ForAccount = S::ForAccount;
166166+ type CreatedBy = S::CreatedBy;
168167 type Uses = S::Uses;
168168+ type Available = S::Available;
169169 type Disabled = S::Disabled;
170170- type CreatedBy = S::CreatedBy;
171171- type ForAccount = Set<members::for_account>;
170170+ type CreatedAt = S::CreatedAt;
171171+ type Code = Set<members::code>;
172172 }
173173 /// Marker types for field names
174174 #[allow(non_camel_case_types)]
175175 pub mod members {
176176+ ///Marker type for the `for_account` field
177177+ pub struct for_account(());
178178+ ///Marker type for the `created_by` field
179179+ pub struct created_by(());
180180+ ///Marker type for the `uses` field
181181+ pub struct uses(());
176182 ///Marker type for the `available` field
177183 pub struct available(());
184184+ ///Marker type for the `disabled` field
185185+ pub struct disabled(());
178186 ///Marker type for the `created_at` field
179187 pub struct created_at(());
180188 ///Marker type for the `code` field
181189 pub struct code(());
182182- ///Marker type for the `uses` field
183183- pub struct uses(());
184184- ///Marker type for the `disabled` field
185185- pub struct disabled(());
186186- ///Marker type for the `created_by` field
187187- pub struct created_by(());
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::ForAccount: invite_code_state::IsSet,
363363+ S::CreatedBy: invite_code_state::IsSet,
364364+ S::Uses: invite_code_state::IsSet,
362365 S::Available: invite_code_state::IsSet,
366366+ S::Disabled: invite_code_state::IsSet,
363367 S::CreatedAt: invite_code_state::IsSet,
364368 S::Code: invite_code_state::IsSet,
365365- S::Uses: invite_code_state::IsSet,
366366- S::Disabled: invite_code_state::IsSet,
367367- S::CreatedBy: invite_code_state::IsSet,
368368- S::ForAccount: invite_code_state::IsSet,
369369{
370370 /// Build the final struct
371371 pub fn build(self) -> InviteCode<'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> {
···3535 }
3636 /// State trait tracking which required fields have been set
3737 pub trait State: sealed::Sealed {
3838- type Did;
3938 type Password;
3939+ type Did;
4040 type Token;
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 Did = Unset;
4746 type Password = Unset;
4747+ type Did = Unset;
4848 type Token = Unset;
4949 }
5050- ///State transition - sets the `did` field to Set
5151- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
5252- impl<S: State> sealed::Sealed for SetDid<S> {}
5353- impl<S: State> State for SetDid<S> {
5454- type Did = Set<members::did>;
5555- type Password = S::Password;
5656- type Token = S::Token;
5757- }
5850 ///State transition - sets the `password` field to Set
5951 pub struct SetPassword<S: State = Empty>(PhantomData<fn() -> S>);
6052 impl<S: State> sealed::Sealed for SetPassword<S> {}
6153 impl<S: State> State for SetPassword<S> {
6262- type Did = S::Did;
6354 type Password = Set<members::password>;
5555+ type Did = S::Did;
5656+ type Token = S::Token;
5757+ }
5858+ ///State transition - sets the `did` field to Set
5959+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
6060+ impl<S: State> sealed::Sealed for SetDid<S> {}
6161+ impl<S: State> State for SetDid<S> {
6262+ type Password = S::Password;
6363+ type Did = Set<members::did>;
6464 type Token = S::Token;
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 Did = S::Did;
7170 type Password = S::Password;
7171+ type Did = S::Did;
7272 type Token = Set<members::token>;
7373 }
7474 /// Marker types for field names
7575 #[allow(non_camel_case_types)]
7676 pub mod members {
7777+ ///Marker type for the `password` field
7878+ pub struct password(());
7779 ///Marker type for the `did` field
7880 pub struct did(());
7979- ///Marker type for the `password` field
8080- pub struct password(());
8181 ///Marker type for the `token` field
8282 pub struct token(());
8383 }
···172172impl<'a, S> DeleteAccountBuilder<'a, S>
173173where
174174 S: delete_account_state::State,
175175- S::Did: delete_account_state::IsSet,
176175 S::Password: delete_account_state::IsSet,
176176+ S::Did: delete_account_state::IsSet,
177177 S::Token: delete_account_state::IsSet,
178178{
179179 /// Build the final struct
···3434 }
3535 /// State trait tracking which required fields have been set
3636 pub trait State: sealed::Sealed {
3737- type CreatedAt;
3837 type Name;
3838+ type CreatedAt;
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 CreatedAt = Unset;
4544 type Name = Unset;
4646- }
4747- ///State transition - sets the `created_at` field to Set
4848- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
4949- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
5050- impl<S: State> State for SetCreatedAt<S> {
5151- type CreatedAt = Set<members::created_at>;
5252- type Name = S::Name;
4545+ type CreatedAt = Unset;
5346 }
5447 ///State transition - sets the `name` field to Set
5548 pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
5649 impl<S: State> sealed::Sealed for SetName<S> {}
5750 impl<S: State> State for SetName<S> {
5858- type CreatedAt = S::CreatedAt;
5951 type Name = Set<members::name>;
5252+ type CreatedAt = S::CreatedAt;
5353+ }
5454+ ///State transition - sets the `created_at` field to Set
5555+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
5656+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
5757+ impl<S: State> State for SetCreatedAt<S> {
5858+ type Name = S::Name;
5959+ type CreatedAt = Set<members::created_at>;
6060 }
6161 /// Marker types for field names
6262 #[allow(non_camel_case_types)]
6363 pub mod members {
6464- ///Marker type for the `created_at` field
6565- pub struct created_at(());
6664 ///Marker type for the `name` field
6765 pub struct name(());
6666+ ///Marker type for the `created_at` field
6767+ pub struct created_at(());
6868 }
6969}
7070···151151impl<'a, S> AppPasswordBuilder<'a, S>
152152where
153153 S: app_password_state::State,
154154- S::CreatedAt: app_password_state::IsSet,
155154 S::Name: app_password_state::IsSet,
155155+ S::CreatedAt: app_password_state::IsSet,
156156{
157157 /// Build the final struct
158158 pub fn build(self) -> AppPassword<'a> {
···3232 }
3333 /// State trait tracking which required fields have been set
3434 pub trait State: sealed::Sealed {
3535- type Did;
3635 type Cid;
3636+ type Did;
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 Did = Unset;
4342 type Cid = Unset;
4444- }
4545- ///State transition - sets the `did` field to Set
4646- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
4747- impl<S: State> sealed::Sealed for SetDid<S> {}
4848- impl<S: State> State for SetDid<S> {
4949- type Did = Set<members::did>;
5050- type Cid = S::Cid;
4343+ type Did = Unset;
5144 }
5245 ///State transition - sets the `cid` field to Set
5346 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
5447 impl<S: State> sealed::Sealed for SetCid<S> {}
5548 impl<S: State> State for SetCid<S> {
5656- type Did = S::Did;
5749 type Cid = Set<members::cid>;
5050+ type Did = S::Did;
5151+ }
5252+ ///State transition - sets the `did` field to Set
5353+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
5454+ impl<S: State> sealed::Sealed for SetDid<S> {}
5555+ impl<S: State> State for SetDid<S> {
5656+ type Cid = S::Cid;
5757+ type Did = Set<members::did>;
5858 }
5959 /// Marker types for field names
6060 #[allow(non_camel_case_types)]
6161 pub mod members {
6262- ///Marker type for the `did` field
6363- pub struct did(());
6462 ///Marker type for the `cid` field
6563 pub struct cid(());
6464+ ///Marker type for the `did` field
6565+ pub struct did(());
6666 }
6767}
6868···135135impl<'a, S> GetBlobBuilder<'a, S>
136136where
137137 S: get_blob_state::State,
138138- S::Did: get_blob_state::IsSet,
139138 S::Cid: get_blob_state::IsSet,
139139+ S::Did: get_blob_state::IsSet,
140140{
141141 /// Build the final struct
142142 pub fn build(self) -> GetBlob<'a> {
···3636 }
3737 /// State trait tracking which required fields have been set
3838 pub trait State: sealed::Sealed {
3939- type Collection;
4039 type Did;
4040+ type Collection;
4141 type Rkey;
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 Collection = Unset;
4847 type Did = Unset;
4848+ type Collection = Unset;
4949 type Rkey = Unset;
5050 }
5151- ///State transition - sets the `collection` field to Set
5252- pub struct SetCollection<S: State = Empty>(PhantomData<fn() -> S>);
5353- impl<S: State> sealed::Sealed for SetCollection<S> {}
5454- impl<S: State> State for SetCollection<S> {
5555- type Collection = Set<members::collection>;
5656- type Did = S::Did;
5757- type Rkey = S::Rkey;
5858- }
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 Collection = S::Collection;
6455 type Did = Set<members::did>;
5656+ type Collection = S::Collection;
5757+ type Rkey = S::Rkey;
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>;
6565 type Rkey = S::Rkey;
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 Collection = S::Collection;
7271 type Did = S::Did;
7272+ type Collection = S::Collection;
7373 type Rkey = Set<members::rkey>;
7474 }
7575 /// Marker types for field names
7676 #[allow(non_camel_case_types)]
7777 pub mod members {
7878+ ///Marker type for the `did` field
7979+ pub struct did(());
7880 ///Marker type for the `collection` field
7981 pub struct collection(());
8080- ///Marker type for the `did` field
8181- pub struct did(());
8282 ///Marker type for the `rkey` field
8383 pub struct rkey(());
8484 }
···181181impl<'a, S> GetRecordBuilder<'a, S>
182182where
183183 S: get_record_state::State,
184184- S::Collection: get_record_state::IsSet,
185184 S::Did: get_record_state::IsSet,
185185+ S::Collection: get_record_state::IsSet,
186186 S::Rkey: get_record_state::IsSet,
187187{
188188 /// Build the final struct
···194194 }
195195 /// State trait tracking which required fields have been set
196196 pub trait State: sealed::Sealed {
197197- type Did;
198198- type Rev;
199197 type Head;
198198+ type Rev;
199199+ type Did;
200200 }
201201 /// Empty state - all required fields are unset
202202 pub struct Empty(());
203203 impl sealed::Sealed for Empty {}
204204 impl State for Empty {
205205+ type Head = Unset;
206206+ type Rev = Unset;
205207 type Did = Unset;
206206- type Rev = Unset;
207207- type Head = Unset;
208208 }
209209- ///State transition - sets the `did` field to Set
210210- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
211211- impl<S: State> sealed::Sealed for SetDid<S> {}
212212- impl<S: State> State for SetDid<S> {
213213- type Did = Set<members::did>;
209209+ ///State transition - sets the `head` field to Set
210210+ pub struct SetHead<S: State = Empty>(PhantomData<fn() -> S>);
211211+ impl<S: State> sealed::Sealed for SetHead<S> {}
212212+ impl<S: State> State for SetHead<S> {
213213+ type Head = Set<members::head>;
214214 type Rev = S::Rev;
215215- type Head = S::Head;
215215+ type Did = S::Did;
216216 }
217217 ///State transition - sets the `rev` field to Set
218218 pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
219219 impl<S: State> sealed::Sealed for SetRev<S> {}
220220 impl<S: State> State for SetRev<S> {
221221- type Did = S::Did;
222222- type Rev = Set<members::rev>;
223221 type Head = S::Head;
222222+ type Rev = Set<members::rev>;
223223+ type Did = S::Did;
224224 }
225225- ///State transition - sets the `head` field to Set
226226- pub struct SetHead<S: State = Empty>(PhantomData<fn() -> S>);
227227- impl<S: State> sealed::Sealed for SetHead<S> {}
228228- impl<S: State> State for SetHead<S> {
229229- type Did = S::Did;
225225+ ///State transition - sets the `did` field to Set
226226+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
227227+ impl<S: State> sealed::Sealed for SetDid<S> {}
228228+ impl<S: State> State for SetDid<S> {
229229+ type Head = S::Head;
230230 type Rev = S::Rev;
231231- type Head = Set<members::head>;
231231+ type Did = Set<members::did>;
232232 }
233233 /// Marker types for field names
234234 #[allow(non_camel_case_types)]
235235 pub mod members {
236236+ ///Marker type for the `head` field
237237+ pub struct head(());
238238+ ///Marker type for the `rev` field
239239+ pub struct rev(());
236240 ///Marker type for the `did` field
237241 pub struct did(());
238238- ///Marker type for the `rev` field
239239- pub struct rev(());
240240- ///Marker type for the `head` field
241241- pub struct head(());
242242 }
243243}
244244···359359impl<'a, S> RepoBuilder<'a, S>
360360where
361361 S: repo_state::State,
362362- S::Did: repo_state::IsSet,
363363- S::Rev: repo_state::IsSet,
364362 S::Head: repo_state::IsSet,
363363+ S::Rev: repo_state::IsSet,
364364+ S::Did: repo_state::IsSet,
365365{
366366 /// Build the final struct
367367 pub fn build(self) -> Repo<'a> {
···4141 /// State trait tracking which required fields have been set
4242 pub trait State: sealed::Sealed {
4343 type Did;
4444- type Active;
4544 type Time;
4545+ type Active;
4646 type Seq;
4747 }
4848 /// Empty state - all required fields are unset
···5050 impl sealed::Sealed for Empty {}
5151 impl State for Empty {
5252 type Did = Unset;
5353- type Active = Unset;
5453 type Time = Unset;
5454+ type Active = Unset;
5555 type Seq = Unset;
5656 }
5757 ///State transition - sets the `did` field to Set
···5959 impl<S: State> sealed::Sealed for SetDid<S> {}
6060 impl<S: State> State for SetDid<S> {
6161 type Did = Set<members::did>;
6262- type Active = S::Active;
6362 type Time = S::Time;
6464- type Seq = S::Seq;
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 Did = S::Did;
7171- type Active = Set<members::active>;
7272- type Time = S::Time;
6363+ type Active = S::Active;
7364 type Seq = S::Seq;
7465 }
7566 ///State transition - sets the `time` field to Set
···7768 impl<S: State> sealed::Sealed for SetTime<S> {}
7869 impl<S: State> State for SetTime<S> {
7970 type Did = S::Did;
8080- type Active = S::Active;
8171 type Time = Set<members::time>;
7272+ type Active = S::Active;
7373+ type Seq = S::Seq;
7474+ }
7575+ ///State transition - sets the `active` field to Set
7676+ pub struct SetActive<S: State = Empty>(PhantomData<fn() -> S>);
7777+ impl<S: State> sealed::Sealed for SetActive<S> {}
7878+ impl<S: State> State for SetActive<S> {
7979+ type Did = S::Did;
8080+ type Time = S::Time;
8181+ type Active = Set<members::active>;
8282 type Seq = S::Seq;
8383 }
8484 ///State transition - sets the `seq` field to Set
···8686 impl<S: State> sealed::Sealed for SetSeq<S> {}
8787 impl<S: State> State for SetSeq<S> {
8888 type Did = S::Did;
8989- type Active = S::Active;
9089 type Time = S::Time;
9090+ type Active = S::Active;
9191 type Seq = Set<members::seq>;
9292 }
9393 /// Marker types for field names
···9595 pub mod members {
9696 ///Marker type for the `did` field
9797 pub struct did(());
9898+ ///Marker type for the `time` field
9999+ pub struct time(());
98100 ///Marker type for the `active` field
99101 pub struct active(());
100100- ///Marker type for the `time` field
101101- pub struct time(());
102102 ///Marker type for the `seq` field
103103 pub struct seq(());
104104 }
···228228where
229229 S: account_state::State,
230230 S::Did: account_state::IsSet,
231231- S::Active: account_state::IsSet,
232231 S::Time: account_state::IsSet,
232232+ S::Active: account_state::IsSet,
233233 S::Seq: account_state::IsSet,
234234{
235235 /// Build the final struct
···10731073 }
10741074 /// State trait tracking which required fields have been set
10751075 pub trait State: sealed::Sealed {
10761076- type TooBig;
10771077- type Blobs;
10781078- type Repo;
10761076+ type Seq;
10771077+ type Blocks;
10791078 type Time;
10801079 type Rev;
10801080+ type Blobs;
10811081+ type Repo;
10821082+ type Rebase;
10811083 type Commit;
10821082- type Blocks;
10831084 type Ops;
10841084- type Rebase;
10851085- type Seq;
10851085+ type TooBig;
10861086 }
10871087 /// Empty state - all required fields are unset
10881088 pub struct Empty(());
10891089 impl sealed::Sealed for Empty {}
10901090 impl State for Empty {
10911091- type TooBig = Unset;
10911091+ type Seq = Unset;
10921092+ type Blocks = Unset;
10931093+ type Time = Unset;
10941094+ type Rev = Unset;
10921095 type Blobs = Unset;
10931096 type Repo = Unset;
10941094- type Time = Unset;
10951095- type Rev = Unset;
10971097+ type Rebase = Unset;
10961098 type Commit = Unset;
10971097- type Blocks = Unset;
10981099 type Ops = Unset;
10991099- type Rebase = Unset;
11001100- type Seq = Unset;
11001100+ type TooBig = Unset;
11011101 }
11021102- ///State transition - sets the `too_big` field to Set
11031103- pub struct SetTooBig<S: State = Empty>(PhantomData<fn() -> S>);
11041104- impl<S: State> sealed::Sealed for SetTooBig<S> {}
11051105- impl<S: State> State for SetTooBig<S> {
11061106- type TooBig = Set<members::too_big>;
11021102+ ///State transition - sets the `seq` field to Set
11031103+ pub struct SetSeq<S: State = Empty>(PhantomData<fn() -> S>);
11041104+ impl<S: State> sealed::Sealed for SetSeq<S> {}
11051105+ impl<S: State> State for SetSeq<S> {
11061106+ type Seq = Set<members::seq>;
11071107+ type Blocks = S::Blocks;
11081108+ type Time = S::Time;
11091109+ type Rev = S::Rev;
11071110 type Blobs = S::Blobs;
11081111 type Repo = S::Repo;
11121112+ type Rebase = S::Rebase;
11131113+ type Commit = S::Commit;
11141114+ type Ops = S::Ops;
11151115+ type TooBig = S::TooBig;
11161116+ }
11171117+ ///State transition - sets the `blocks` field to Set
11181118+ pub struct SetBlocks<S: State = Empty>(PhantomData<fn() -> S>);
11191119+ impl<S: State> sealed::Sealed for SetBlocks<S> {}
11201120+ impl<S: State> State for SetBlocks<S> {
11211121+ type Seq = S::Seq;
11221122+ type Blocks = Set<members::blocks>;
11091123 type Time = S::Time;
11101124 type Rev = S::Rev;
11251125+ type Blobs = S::Blobs;
11261126+ type Repo = S::Repo;
11271127+ type Rebase = S::Rebase;
11111128 type Commit = S::Commit;
11291129+ type Ops = S::Ops;
11301130+ type TooBig = S::TooBig;
11311131+ }
11321132+ ///State transition - sets the `time` field to Set
11331133+ pub struct SetTime<S: State = Empty>(PhantomData<fn() -> S>);
11341134+ impl<S: State> sealed::Sealed for SetTime<S> {}
11351135+ impl<S: State> State for SetTime<S> {
11361136+ type Seq = S::Seq;
11121137 type Blocks = S::Blocks;
11381138+ type Time = Set<members::time>;
11391139+ type Rev = S::Rev;
11401140+ type Blobs = S::Blobs;
11411141+ type Repo = S::Repo;
11421142+ type Rebase = S::Rebase;
11431143+ type Commit = S::Commit;
11131144 type Ops = S::Ops;
11451145+ type TooBig = S::TooBig;
11461146+ }
11471147+ ///State transition - sets the `rev` field to Set
11481148+ pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
11491149+ impl<S: State> sealed::Sealed for SetRev<S> {}
11501150+ impl<S: State> State for SetRev<S> {
11511151+ type Seq = S::Seq;
11521152+ type Blocks = S::Blocks;
11531153+ type Time = S::Time;
11541154+ type Rev = Set<members::rev>;
11551155+ type Blobs = S::Blobs;
11561156+ type Repo = S::Repo;
11141157 type Rebase = S::Rebase;
11151115- type Seq = S::Seq;
11581158+ type Commit = S::Commit;
11591159+ type Ops = S::Ops;
11601160+ type TooBig = S::TooBig;
11161161 }
11171162 ///State transition - sets the `blobs` field to Set
11181163 pub struct SetBlobs<S: State = Empty>(PhantomData<fn() -> S>);
11191164 impl<S: State> sealed::Sealed for SetBlobs<S> {}
11201165 impl<S: State> State for SetBlobs<S> {
11211121- type TooBig = S::TooBig;
11661166+ type Seq = S::Seq;
11671167+ type Blocks = S::Blocks;
11681168+ type Time = S::Time;
11691169+ type Rev = S::Rev;
11221170 type Blobs = Set<members::blobs>;
11231171 type Repo = S::Repo;
11241124- type Time = S::Time;
11251125- type Rev = S::Rev;
11721172+ type Rebase = S::Rebase;
11261173 type Commit = S::Commit;
11271127- type Blocks = S::Blocks;
11281174 type Ops = S::Ops;
11291129- type Rebase = S::Rebase;
11301130- type Seq = S::Seq;
11751175+ type TooBig = S::TooBig;
11311176 }
11321177 ///State transition - sets the `repo` field to Set
11331178 pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
11341179 impl<S: State> sealed::Sealed for SetRepo<S> {}
11351180 impl<S: State> State for SetRepo<S> {
11361136- type TooBig = S::TooBig;
11811181+ type Seq = S::Seq;
11821182+ type Blocks = S::Blocks;
11831183+ type Time = S::Time;
11841184+ type Rev = S::Rev;
11371185 type Blobs = S::Blobs;
11381186 type Repo = Set<members::repo>;
11391139- type Time = S::Time;
11401140- type Rev = S::Rev;
11871187+ type Rebase = S::Rebase;
11411188 type Commit = S::Commit;
11421142- type Blocks = S::Blocks;
11431189 type Ops = S::Ops;
11441144- type Rebase = S::Rebase;
11901190+ type TooBig = S::TooBig;
11911191+ }
11921192+ ///State transition - sets the `rebase` field to Set
11931193+ pub struct SetRebase<S: State = Empty>(PhantomData<fn() -> S>);
11941194+ impl<S: State> sealed::Sealed for SetRebase<S> {}
11951195+ impl<S: State> State for SetRebase<S> {
11451196 type Seq = S::Seq;
11461146- }
11471147- ///State transition - sets the `time` field to Set
11481148- pub struct SetTime<S: State = Empty>(PhantomData<fn() -> S>);
11491149- impl<S: State> sealed::Sealed for SetTime<S> {}
11501150- impl<S: State> State for SetTime<S> {
11511151- type TooBig = S::TooBig;
11521152- type Blobs = S::Blobs;
11531153- type Repo = S::Repo;
11541154- type Time = Set<members::time>;
11971197+ type Blocks = S::Blocks;
11981198+ type Time = S::Time;
11551199 type Rev = S::Rev;
11561156- type Commit = S::Commit;
11571157- type Blocks = S::Blocks;
11581158- type Ops = S::Ops;
11591159- type Rebase = S::Rebase;
11601160- type Seq = S::Seq;
11611161- }
11621162- ///State transition - sets the `rev` field to Set
11631163- pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
11641164- impl<S: State> sealed::Sealed for SetRev<S> {}
11651165- impl<S: State> State for SetRev<S> {
11661166- type TooBig = S::TooBig;
11671200 type Blobs = S::Blobs;
11681201 type Repo = S::Repo;
11691169- type Time = S::Time;
11701170- type Rev = Set<members::rev>;
12021202+ type Rebase = Set<members::rebase>;
11711203 type Commit = S::Commit;
11721172- type Blocks = S::Blocks;
11731204 type Ops = S::Ops;
11741174- type Rebase = S::Rebase;
11751175- type Seq = S::Seq;
12051205+ type TooBig = S::TooBig;
11761206 }
11771207 ///State transition - sets the `commit` field to Set
11781208 pub struct SetCommit<S: State = Empty>(PhantomData<fn() -> S>);
11791209 impl<S: State> sealed::Sealed for SetCommit<S> {}
11801210 impl<S: State> State for SetCommit<S> {
11811181- type TooBig = S::TooBig;
11821182- type Blobs = S::Blobs;
11831183- type Repo = S::Repo;
12111211+ type Seq = S::Seq;
12121212+ type Blocks = S::Blocks;
11841213 type Time = S::Time;
11851214 type Rev = S::Rev;
11861186- type Commit = Set<members::commit>;
11871187- type Blocks = S::Blocks;
11881188- type Ops = S::Ops;
11891189- type Rebase = S::Rebase;
11901190- type Seq = S::Seq;
11911191- }
11921192- ///State transition - sets the `blocks` field to Set
11931193- pub struct SetBlocks<S: State = Empty>(PhantomData<fn() -> S>);
11941194- impl<S: State> sealed::Sealed for SetBlocks<S> {}
11951195- impl<S: State> State for SetBlocks<S> {
11961196- type TooBig = S::TooBig;
11971215 type Blobs = S::Blobs;
11981216 type Repo = S::Repo;
11991199- type Time = S::Time;
12001200- type Rev = S::Rev;
12011201- type Commit = S::Commit;
12021202- type Blocks = Set<members::blocks>;
12171217+ type Rebase = S::Rebase;
12181218+ type Commit = Set<members::commit>;
12031219 type Ops = S::Ops;
12041204- type Rebase = S::Rebase;
12051205- type Seq = S::Seq;
12201220+ type TooBig = S::TooBig;
12061221 }
12071222 ///State transition - sets the `ops` field to Set
12081223 pub struct SetOps<S: State = Empty>(PhantomData<fn() -> S>);
12091224 impl<S: State> sealed::Sealed for SetOps<S> {}
12101225 impl<S: State> State for SetOps<S> {
12111211- type TooBig = S::TooBig;
12121212- type Blobs = S::Blobs;
12131213- type Repo = S::Repo;
12261226+ type Seq = S::Seq;
12271227+ type Blocks = S::Blocks;
12141228 type Time = S::Time;
12151229 type Rev = S::Rev;
12301230+ type Blobs = S::Blobs;
12311231+ type Repo = S::Repo;
12321232+ type Rebase = S::Rebase;
12161233 type Commit = S::Commit;
12171217- type Blocks = S::Blocks;
12181234 type Ops = Set<members::ops>;
12191219- type Rebase = S::Rebase;
12351235+ type TooBig = S::TooBig;
12361236+ }
12371237+ ///State transition - sets the `too_big` field to Set
12381238+ pub struct SetTooBig<S: State = Empty>(PhantomData<fn() -> S>);
12391239+ impl<S: State> sealed::Sealed for SetTooBig<S> {}
12401240+ impl<S: State> State for SetTooBig<S> {
12201241 type Seq = S::Seq;
12211221- }
12221222- ///State transition - sets the `rebase` field to Set
12231223- pub struct SetRebase<S: State = Empty>(PhantomData<fn() -> S>);
12241224- impl<S: State> sealed::Sealed for SetRebase<S> {}
12251225- impl<S: State> State for SetRebase<S> {
12261226- type TooBig = S::TooBig;
12271227- type Blobs = S::Blobs;
12281228- type Repo = S::Repo;
12421242+ type Blocks = S::Blocks;
12291243 type Time = S::Time;
12301244 type Rev = S::Rev;
12311231- type Commit = S::Commit;
12321232- type Blocks = S::Blocks;
12331233- type Ops = S::Ops;
12341234- type Rebase = Set<members::rebase>;
12351235- type Seq = S::Seq;
12361236- }
12371237- ///State transition - sets the `seq` field to Set
12381238- pub struct SetSeq<S: State = Empty>(PhantomData<fn() -> S>);
12391239- impl<S: State> sealed::Sealed for SetSeq<S> {}
12401240- impl<S: State> State for SetSeq<S> {
12411241- type TooBig = S::TooBig;
12421245 type Blobs = S::Blobs;
12431246 type Repo = S::Repo;
12441244- type Time = S::Time;
12451245- type Rev = S::Rev;
12471247+ type Rebase = S::Rebase;
12461248 type Commit = S::Commit;
12471247- type Blocks = S::Blocks;
12481249 type Ops = S::Ops;
12491249- type Rebase = S::Rebase;
12501250- type Seq = Set<members::seq>;
12501250+ type TooBig = Set<members::too_big>;
12511251 }
12521252 /// Marker types for field names
12531253 #[allow(non_camel_case_types)]
12541254 pub mod members {
12551255- ///Marker type for the `too_big` field
12561256- pub struct too_big(());
12571257- ///Marker type for the `blobs` field
12581258- pub struct blobs(());
12591259- ///Marker type for the `repo` field
12601260- pub struct repo(());
12551255+ ///Marker type for the `seq` field
12561256+ pub struct seq(());
12571257+ ///Marker type for the `blocks` field
12581258+ pub struct blocks(());
12611259 ///Marker type for the `time` field
12621260 pub struct time(());
12631261 ///Marker type for the `rev` field
12641262 pub struct rev(());
12631263+ ///Marker type for the `blobs` field
12641264+ pub struct blobs(());
12651265+ ///Marker type for the `repo` field
12661266+ pub struct repo(());
12671267+ ///Marker type for the `rebase` field
12681268+ pub struct rebase(());
12651269 ///Marker type for the `commit` field
12661270 pub struct commit(());
12671267- ///Marker type for the `blocks` field
12681268- pub struct blocks(());
12691271 ///Marker type for the `ops` field
12701272 pub struct ops(());
12711271- ///Marker type for the `rebase` field
12721272- pub struct rebase(());
12731273- ///Marker type for the `seq` field
12741274- pub struct seq(());
12731273+ ///Marker type for the `too_big` field
12741274+ pub struct too_big(());
12751275 }
12761276}
12771277···15591559impl<'a, S> CommitBuilder<'a, S>
15601560where
15611561 S: commit_state::State,
15621562- S::TooBig: commit_state::IsSet,
15631563- S::Blobs: commit_state::IsSet,
15641564- S::Repo: commit_state::IsSet,
15621562+ S::Seq: commit_state::IsSet,
15631563+ S::Blocks: commit_state::IsSet,
15651564 S::Time: commit_state::IsSet,
15661565 S::Rev: commit_state::IsSet,
15661566+ S::Blobs: commit_state::IsSet,
15671567+ S::Repo: commit_state::IsSet,
15681568+ S::Rebase: commit_state::IsSet,
15671569 S::Commit: commit_state::IsSet,
15681568- S::Blocks: commit_state::IsSet,
15691570 S::Ops: commit_state::IsSet,
15701570- S::Rebase: commit_state::IsSet,
15711571- S::Seq: commit_state::IsSet,
15711571+ S::TooBig: commit_state::IsSet,
15721572{
15731573 /// Build the final struct
15741574 pub fn build(self) -> Commit<'a> {
···16771677 }
16781678 /// State trait tracking which required fields have been set
16791679 pub trait State: sealed::Sealed {
16801680- type Seq;
16811680 type Did;
16821681 type Time;
16821682+ type Seq;
16831683 }
16841684 /// Empty state - all required fields are unset
16851685 pub struct Empty(());
16861686 impl sealed::Sealed for Empty {}
16871687 impl State for Empty {
16881688- type Seq = Unset;
16891688 type Did = Unset;
16901689 type Time = Unset;
16911691- }
16921692- ///State transition - sets the `seq` field to Set
16931693- pub struct SetSeq<S: State = Empty>(PhantomData<fn() -> S>);
16941694- impl<S: State> sealed::Sealed for SetSeq<S> {}
16951695- impl<S: State> State for SetSeq<S> {
16961696- type Seq = Set<members::seq>;
16971697- type Did = S::Did;
16981698- type Time = S::Time;
16901690+ type Seq = Unset;
16991691 }
17001692 ///State transition - sets the `did` field to Set
17011693 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
17021694 impl<S: State> sealed::Sealed for SetDid<S> {}
17031695 impl<S: State> State for SetDid<S> {
17041704- type Seq = S::Seq;
17051696 type Did = Set<members::did>;
17061697 type Time = S::Time;
16981698+ type Seq = S::Seq;
17071699 }
17081700 ///State transition - sets the `time` field to Set
17091701 pub struct SetTime<S: State = Empty>(PhantomData<fn() -> S>);
17101702 impl<S: State> sealed::Sealed for SetTime<S> {}
17111703 impl<S: State> State for SetTime<S> {
17041704+ type Did = S::Did;
17051705+ type Time = Set<members::time>;
17121706 type Seq = S::Seq;
17071707+ }
17081708+ ///State transition - sets the `seq` field to Set
17091709+ pub struct SetSeq<S: State = Empty>(PhantomData<fn() -> S>);
17101710+ impl<S: State> sealed::Sealed for SetSeq<S> {}
17111711+ impl<S: State> State for SetSeq<S> {
17131712 type Did = S::Did;
17141714- type Time = Set<members::time>;
17131713+ type Time = S::Time;
17141714+ type Seq = Set<members::seq>;
17151715 }
17161716 /// Marker types for field names
17171717 #[allow(non_camel_case_types)]
17181718 pub mod members {
17191719- ///Marker type for the `seq` field
17201720- pub struct seq(());
17211719 ///Marker type for the `did` field
17221720 pub struct did(());
17231721 ///Marker type for the `time` field
17241722 pub struct time(());
17231723+ ///Marker type for the `seq` field
17241724+ pub struct seq(());
17251725 }
17261726}
17271727···18341834impl<'a, S> IdentityBuilder<'a, S>
18351835where
18361836 S: identity_state::State,
18371837- S::Seq: identity_state::IsSet,
18381837 S::Did: identity_state::IsSet,
18391838 S::Time: identity_state::IsSet,
18391839+ S::Seq: identity_state::IsSet,
18401840{
18411841 /// Build the final struct
18421842 pub fn build(self) -> Identity<'a> {
···25792579 }
25802580 /// State trait tracking which required fields have been set
25812581 pub trait State: sealed::Sealed {
25822582- type Rev;
25832583- type Blocks;
25842582 type Did;
25832583+ type Blocks;
25842584+ type Rev;
25852585 type Seq;
25862586 type Time;
25872587 }
···25892589 pub struct Empty(());
25902590 impl sealed::Sealed for Empty {}
25912591 impl State for Empty {
25922592+ type Did = Unset;
25932593+ type Blocks = Unset;
25922594 type Rev = Unset;
25932593- type Blocks = Unset;
25942594- type Did = Unset;
25952595 type Seq = Unset;
25962596 type Time = Unset;
25972597 }
25982598- ///State transition - sets the `rev` field to Set
25992599- pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
26002600- impl<S: State> sealed::Sealed for SetRev<S> {}
26012601- impl<S: State> State for SetRev<S> {
26022602- type Rev = Set<members::rev>;
25982598+ ///State transition - sets the `did` field to Set
25992599+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
26002600+ impl<S: State> sealed::Sealed for SetDid<S> {}
26012601+ impl<S: State> State for SetDid<S> {
26022602+ type Did = Set<members::did>;
26032603 type Blocks = S::Blocks;
26042604- type Did = S::Did;
26042604+ type Rev = S::Rev;
26052605 type Seq = S::Seq;
26062606 type Time = S::Time;
26072607 }
···26092609 pub struct SetBlocks<S: State = Empty>(PhantomData<fn() -> S>);
26102610 impl<S: State> sealed::Sealed for SetBlocks<S> {}
26112611 impl<S: State> State for SetBlocks<S> {
26122612- type Rev = S::Rev;
26122612+ type Did = S::Did;
26132613 type Blocks = Set<members::blocks>;
26142614- type Did = S::Did;
26142614+ type Rev = S::Rev;
26152615 type Seq = S::Seq;
26162616 type Time = S::Time;
26172617 }
26182618- ///State transition - sets the `did` field to Set
26192619- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
26202620- impl<S: State> sealed::Sealed for SetDid<S> {}
26212621- impl<S: State> State for SetDid<S> {
26222622- type Rev = S::Rev;
26182618+ ///State transition - sets the `rev` field to Set
26192619+ pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
26202620+ impl<S: State> sealed::Sealed for SetRev<S> {}
26212621+ impl<S: State> State for SetRev<S> {
26222622+ type Did = S::Did;
26232623 type Blocks = S::Blocks;
26242624- type Did = Set<members::did>;
26242624+ type Rev = Set<members::rev>;
26252625 type Seq = S::Seq;
26262626 type Time = S::Time;
26272627 }
···26292629 pub struct SetSeq<S: State = Empty>(PhantomData<fn() -> S>);
26302630 impl<S: State> sealed::Sealed for SetSeq<S> {}
26312631 impl<S: State> State for SetSeq<S> {
26322632- type Rev = S::Rev;
26322632+ type Did = S::Did;
26332633 type Blocks = S::Blocks;
26342634- type Did = S::Did;
26342634+ type Rev = S::Rev;
26352635 type Seq = Set<members::seq>;
26362636 type Time = S::Time;
26372637 }
···26392639 pub struct SetTime<S: State = Empty>(PhantomData<fn() -> S>);
26402640 impl<S: State> sealed::Sealed for SetTime<S> {}
26412641 impl<S: State> State for SetTime<S> {
26422642+ type Did = S::Did;
26432643+ type Blocks = S::Blocks;
26422644 type Rev = S::Rev;
26432643- type Blocks = S::Blocks;
26442644- type Did = S::Did;
26452645 type Seq = S::Seq;
26462646 type Time = Set<members::time>;
26472647 }
26482648 /// Marker types for field names
26492649 #[allow(non_camel_case_types)]
26502650 pub mod members {
26512651- ///Marker type for the `rev` field
26522652- pub struct rev(());
26512651+ ///Marker type for the `did` field
26522652+ pub struct did(());
26532653 ///Marker type for the `blocks` field
26542654 pub struct blocks(());
26552655- ///Marker type for the `did` field
26562656- pub struct did(());
26552655+ ///Marker type for the `rev` field
26562656+ pub struct rev(());
26572657 ///Marker type for the `seq` field
26582658 pub struct seq(());
26592659 ///Marker type for the `time` field
···27902790impl<'a, S> SyncBuilder<'a, S>
27912791where
27922792 S: sync_state::State,
27932793- S::Rev: sync_state::IsSet,
27942794- S::Blocks: sync_state::IsSet,
27952793 S::Did: sync_state::IsSet,
27942794+ S::Blocks: sync_state::IsSet,
27952795+ S::Rev: sync_state::IsSet,
27962796 S::Seq: sync_state::IsSet,
27972797 S::Time: sync_state::IsSet,
27982798{
···4242 }
4343 /// State trait tracking which required fields have been set
4444 pub trait State: sealed::Sealed {
4545+ type Section;
4546 type ScryfallId;
4647 type Quantity;
4747- type Section;
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 Section = Unset;
5354 type ScryfallId = Unset;
5455 type Quantity = Unset;
5555- type Section = Unset;
5656+ }
5757+ ///State transition - sets the `section` field to Set
5858+ pub struct SetSection<S: State = Empty>(PhantomData<fn() -> S>);
5959+ impl<S: State> sealed::Sealed for SetSection<S> {}
6060+ impl<S: State> State for SetSection<S> {
6161+ type Section = Set<members::section>;
6262+ type ScryfallId = S::ScryfallId;
6363+ type Quantity = S::Quantity;
5664 }
5765 ///State transition - sets the `scryfall_id` field to Set
5866 pub struct SetScryfallId<S: State = Empty>(PhantomData<fn() -> S>);
5967 impl<S: State> sealed::Sealed for SetScryfallId<S> {}
6068 impl<S: State> State for SetScryfallId<S> {
6969+ type Section = S::Section;
6170 type ScryfallId = Set<members::scryfall_id>;
6271 type Quantity = S::Quantity;
6363- type Section = S::Section;
6472 }
6573 ///State transition - sets the `quantity` field to Set
6674 pub struct SetQuantity<S: State = Empty>(PhantomData<fn() -> S>);
6775 impl<S: State> sealed::Sealed for SetQuantity<S> {}
6876 impl<S: State> State for SetQuantity<S> {
6969- type ScryfallId = S::ScryfallId;
7070- type Quantity = Set<members::quantity>;
7177 type Section = S::Section;
7272- }
7373- ///State transition - sets the `section` field to Set
7474- pub struct SetSection<S: State = Empty>(PhantomData<fn() -> S>);
7575- impl<S: State> sealed::Sealed for SetSection<S> {}
7676- impl<S: State> State for SetSection<S> {
7778 type ScryfallId = S::ScryfallId;
7878- type Quantity = S::Quantity;
7979- type Section = Set<members::section>;
7979+ type Quantity = Set<members::quantity>;
8080 }
8181 /// Marker types for field names
8282 #[allow(non_camel_case_types)]
8383 pub mod members {
8484+ ///Marker type for the `section` field
8585+ pub struct section(());
8486 ///Marker type for the `scryfall_id` field
8587 pub struct scryfall_id(());
8688 ///Marker type for the `quantity` field
8789 pub struct quantity(());
8888- ///Marker type for the `section` field
8989- pub struct section(());
9090 }
9191}
9292···199199impl<'a, S> CardBuilder<'a, S>
200200where
201201 S: card_state::State,
202202+ S::Section: card_state::IsSet,
202203 S::ScryfallId: card_state::IsSet,
203204 S::Quantity: card_state::IsSet,
204204- S::Section: card_state::IsSet,
205205{
206206 /// Build the final struct
207207 pub fn build(self) -> Card<'a> {
···704704 }
705705 /// State trait tracking which required fields have been set
706706 pub trait State: sealed::Sealed {
707707- type CreatedAt;
708707 type Name;
709708 type Cards;
709709+ type CreatedAt;
710710 }
711711 /// Empty state - all required fields are unset
712712 pub struct Empty(());
713713 impl sealed::Sealed for Empty {}
714714 impl State for Empty {
715715- type CreatedAt = Unset;
716715 type Name = Unset;
717716 type Cards = Unset;
718718- }
719719- ///State transition - sets the `created_at` field to Set
720720- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
721721- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
722722- impl<S: State> State for SetCreatedAt<S> {
723723- type CreatedAt = Set<members::created_at>;
724724- type Name = S::Name;
725725- type Cards = S::Cards;
717717+ type CreatedAt = Unset;
726718 }
727719 ///State transition - sets the `name` field to Set
728720 pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
729721 impl<S: State> sealed::Sealed for SetName<S> {}
730722 impl<S: State> State for SetName<S> {
731731- type CreatedAt = S::CreatedAt;
732723 type Name = Set<members::name>;
733724 type Cards = S::Cards;
725725+ type CreatedAt = S::CreatedAt;
734726 }
735727 ///State transition - sets the `cards` field to Set
736728 pub struct SetCards<S: State = Empty>(PhantomData<fn() -> S>);
737729 impl<S: State> sealed::Sealed for SetCards<S> {}
738730 impl<S: State> State for SetCards<S> {
739739- type CreatedAt = S::CreatedAt;
740731 type Name = S::Name;
741732 type Cards = Set<members::cards>;
733733+ type CreatedAt = S::CreatedAt;
734734+ }
735735+ ///State transition - sets the `created_at` field to Set
736736+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
737737+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
738738+ impl<S: State> State for SetCreatedAt<S> {
739739+ type Name = S::Name;
740740+ type Cards = S::Cards;
741741+ type CreatedAt = Set<members::created_at>;
742742 }
743743 /// Marker types for field names
744744 #[allow(non_camel_case_types)]
745745 pub mod members {
746746- ///Marker type for the `created_at` field
747747- pub struct created_at(());
748746 ///Marker type for the `name` field
749747 pub struct name(());
750748 ///Marker type for the `cards` field
751749 pub struct cards(());
750750+ ///Marker type for the `created_at` field
751751+ pub struct created_at(());
752752 }
753753}
754754···915915impl<'a, S> ListBuilder<'a, S>
916916where
917917 S: list_state::State,
918918- S::CreatedAt: list_state::IsSet,
919918 S::Name: list_state::IsSet,
920919 S::Cards: list_state::IsSet,
920920+ S::CreatedAt: list_state::IsSet,
921921{
922922 /// Build the final struct
923923 pub fn build(self) -> List<'a> {
···3434 }
3535 /// State trait tracking which required fields have been set
3636 pub trait State: sealed::Sealed {
3737- type ByteStart;
3837 type ByteEnd;
3838+ type ByteStart;
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 ByteStart = Unset;
4544 type ByteEnd = Unset;
4646- }
4747- ///State transition - sets the `byte_start` field to Set
4848- pub struct SetByteStart<S: State = Empty>(PhantomData<fn() -> S>);
4949- impl<S: State> sealed::Sealed for SetByteStart<S> {}
5050- impl<S: State> State for SetByteStart<S> {
5151- type ByteStart = Set<members::byte_start>;
5252- type ByteEnd = S::ByteEnd;
4545+ type ByteStart = Unset;
5346 }
5447 ///State transition - sets the `byte_end` field to Set
5548 pub struct SetByteEnd<S: State = Empty>(PhantomData<fn() -> S>);
5649 impl<S: State> sealed::Sealed for SetByteEnd<S> {}
5750 impl<S: State> State for SetByteEnd<S> {
5858- type ByteStart = S::ByteStart;
5951 type ByteEnd = Set<members::byte_end>;
5252+ type ByteStart = S::ByteStart;
5353+ }
5454+ ///State transition - sets the `byte_start` field to Set
5555+ pub struct SetByteStart<S: State = Empty>(PhantomData<fn() -> S>);
5656+ impl<S: State> sealed::Sealed for SetByteStart<S> {}
5757+ impl<S: State> State for SetByteStart<S> {
5858+ type ByteEnd = S::ByteEnd;
5959+ type ByteStart = Set<members::byte_start>;
6060 }
6161 /// Marker types for field names
6262 #[allow(non_camel_case_types)]
6363 pub mod members {
6464- ///Marker type for the `byte_start` field
6565- pub struct byte_start(());
6664 ///Marker type for the `byte_end` field
6765 pub struct byte_end(());
6666+ ///Marker type for the `byte_start` field
6767+ pub struct byte_start(());
6868 }
6969}
7070···134134impl<'a, S> ByteSliceBuilder<'a, S>
135135where
136136 S: byte_slice_state::State,
137137- S::ByteStart: byte_slice_state::IsSet,
138137 S::ByteEnd: byte_slice_state::IsSet,
138138+ S::ByteStart: byte_slice_state::IsSet,
139139{
140140 /// Build the final struct
141141 pub fn build(self) -> ByteSlice<'a> {
+13-13
crates/weaver-api/src/com_whtwnd/blog.rs
···454454 }
455455 /// State trait tracking which required fields have been set
456456 pub trait State: sealed::Sealed {
457457- type EntryUri;
458457 type Content;
458458+ type EntryUri;
459459 }
460460 /// Empty state - all required fields are unset
461461 pub struct Empty(());
462462 impl sealed::Sealed for Empty {}
463463 impl State for Empty {
464464- type EntryUri = Unset;
465464 type Content = Unset;
466466- }
467467- ///State transition - sets the `entry_uri` field to Set
468468- pub struct SetEntryUri<S: State = Empty>(PhantomData<fn() -> S>);
469469- impl<S: State> sealed::Sealed for SetEntryUri<S> {}
470470- impl<S: State> State for SetEntryUri<S> {
471471- type EntryUri = Set<members::entry_uri>;
472472- type Content = S::Content;
465465+ type EntryUri = Unset;
473466 }
474467 ///State transition - sets the `content` field to Set
475468 pub struct SetContent<S: State = Empty>(PhantomData<fn() -> S>);
476469 impl<S: State> sealed::Sealed for SetContent<S> {}
477470 impl<S: State> State for SetContent<S> {
478478- type EntryUri = S::EntryUri;
479471 type Content = Set<members::content>;
472472+ type EntryUri = S::EntryUri;
473473+ }
474474+ ///State transition - sets the `entry_uri` field to Set
475475+ pub struct SetEntryUri<S: State = Empty>(PhantomData<fn() -> S>);
476476+ impl<S: State> sealed::Sealed for SetEntryUri<S> {}
477477+ impl<S: State> State for SetEntryUri<S> {
478478+ type Content = S::Content;
479479+ type EntryUri = Set<members::entry_uri>;
480480 }
481481 /// Marker types for field names
482482 #[allow(non_camel_case_types)]
483483 pub mod members {
484484- ///Marker type for the `entry_uri` field
485485- pub struct entry_uri(());
486484 ///Marker type for the `content` field
487485 pub struct content(());
486486+ ///Marker type for the `entry_uri` field
487487+ pub struct entry_uri(());
488488 }
489489}
490490···557557impl<'a, S> CommentBuilder<'a, S>
558558where
559559 S: comment_state::State,
560560- S::EntryUri: comment_state::IsSet,
561560 S::Content: comment_state::IsSet,
561561+ S::EntryUri: comment_state::IsSet,
562562{
563563 /// Build the final struct
564564 pub fn build(self) -> Comment<'a> {
+13-13
crates/weaver-api/src/pub_leaflet/blocks/image.rs
···3131 }
3232 /// State trait tracking which required fields have been set
3333 pub trait State: sealed::Sealed {
3434- type Height;
3534 type Width;
3535+ type Height;
3636 }
3737 /// Empty state - all required fields are unset
3838 pub struct Empty(());
3939 impl sealed::Sealed for Empty {}
4040 impl State for Empty {
4141- type Height = Unset;
4241 type Width = Unset;
4343- }
4444- ///State transition - sets the `height` field to Set
4545- pub struct SetHeight<S: State = Empty>(PhantomData<fn() -> S>);
4646- impl<S: State> sealed::Sealed for SetHeight<S> {}
4747- impl<S: State> State for SetHeight<S> {
4848- type Height = Set<members::height>;
4949- type Width = S::Width;
4242+ type Height = Unset;
5043 }
5144 ///State transition - sets the `width` field to Set
5245 pub struct SetWidth<S: State = Empty>(PhantomData<fn() -> S>);
5346 impl<S: State> sealed::Sealed for SetWidth<S> {}
5447 impl<S: State> State for SetWidth<S> {
5555- type Height = S::Height;
5648 type Width = Set<members::width>;
4949+ type Height = S::Height;
5050+ }
5151+ ///State transition - sets the `height` field to Set
5252+ pub struct SetHeight<S: State = Empty>(PhantomData<fn() -> S>);
5353+ impl<S: State> sealed::Sealed for SetHeight<S> {}
5454+ impl<S: State> State for SetHeight<S> {
5555+ type Width = S::Width;
5656+ type Height = Set<members::height>;
5757 }
5858 /// Marker types for field names
5959 #[allow(non_camel_case_types)]
6060 pub mod members {
6161- ///Marker type for the `height` field
6262- pub struct height(());
6361 ///Marker type for the `width` field
6462 pub struct width(());
6363+ ///Marker type for the `height` field
6464+ pub struct height(());
6565 }
6666}
6767···131131impl<'a, S> AspectRatioBuilder<'a, S>
132132where
133133 S: aspect_ratio_state::State,
134134- S::Height: aspect_ratio_state::IsSet,
135134 S::Width: aspect_ratio_state::IsSet,
135135+ S::Height: aspect_ratio_state::IsSet,
136136{
137137 /// Build the final struct
138138 pub fn build(self) -> AspectRatio<'a> {
+37-37
crates/weaver-api/src/pub_leaflet/comment.rs
···3333 }
3434 /// State trait tracking which required fields have been set
3535 pub trait State: sealed::Sealed {
3636- type Quote;
3736 type Document;
3737+ type Quote;
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 Quote = Unset;
4443 type Document = Unset;
4545- }
4646- ///State transition - sets the `quote` field to Set
4747- pub struct SetQuote<S: State = Empty>(PhantomData<fn() -> S>);
4848- impl<S: State> sealed::Sealed for SetQuote<S> {}
4949- impl<S: State> State for SetQuote<S> {
5050- type Quote = Set<members::quote>;
5151- type Document = S::Document;
4444+ type Quote = Unset;
5245 }
5346 ///State transition - sets the `document` field to Set
5447 pub struct SetDocument<S: State = Empty>(PhantomData<fn() -> S>);
5548 impl<S: State> sealed::Sealed for SetDocument<S> {}
5649 impl<S: State> State for SetDocument<S> {
5757- type Quote = S::Quote;
5850 type Document = Set<members::document>;
5151+ type Quote = S::Quote;
5252+ }
5353+ ///State transition - sets the `quote` field to Set
5454+ pub struct SetQuote<S: State = Empty>(PhantomData<fn() -> S>);
5555+ impl<S: State> sealed::Sealed for SetQuote<S> {}
5656+ impl<S: State> State for SetQuote<S> {
5757+ type Document = S::Document;
5858+ type Quote = Set<members::quote>;
5959 }
6060 /// Marker types for field names
6161 #[allow(non_camel_case_types)]
6262 pub mod members {
6363- ///Marker type for the `quote` field
6464- pub struct quote(());
6563 ///Marker type for the `document` field
6664 pub struct document(());
6565+ ///Marker type for the `quote` field
6666+ pub struct quote(());
6767 }
6868}
6969···136136impl<'a, S> LinearDocumentQuoteBuilder<'a, S>
137137where
138138 S: linear_document_quote_state::State,
139139- S::Quote: linear_document_quote_state::IsSet,
140139 S::Document: linear_document_quote_state::IsSet,
140140+ S::Quote: linear_document_quote_state::IsSet,
141141{
142142 /// Build the final struct
143143 pub fn build(self) -> LinearDocumentQuote<'a> {
···443443 }
444444 /// State trait tracking which required fields have been set
445445 pub trait State: sealed::Sealed {
446446- type CreatedAt;
447447- type Plaintext;
448446 type Subject;
447447+ type Plaintext;
448448+ type CreatedAt;
449449 }
450450 /// Empty state - all required fields are unset
451451 pub struct Empty(());
452452 impl sealed::Sealed for Empty {}
453453 impl State for Empty {
454454+ type Subject = Unset;
455455+ type Plaintext = Unset;
454456 type CreatedAt = Unset;
455455- type Plaintext = Unset;
456456- type Subject = Unset;
457457 }
458458- ///State transition - sets the `created_at` field to Set
459459- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
460460- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
461461- impl<S: State> State for SetCreatedAt<S> {
462462- type CreatedAt = Set<members::created_at>;
458458+ ///State transition - sets the `subject` field to Set
459459+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
460460+ impl<S: State> sealed::Sealed for SetSubject<S> {}
461461+ impl<S: State> State for SetSubject<S> {
462462+ type Subject = Set<members::subject>;
463463 type Plaintext = S::Plaintext;
464464- type Subject = S::Subject;
464464+ type CreatedAt = S::CreatedAt;
465465 }
466466 ///State transition - sets the `plaintext` field to Set
467467 pub struct SetPlaintext<S: State = Empty>(PhantomData<fn() -> S>);
468468 impl<S: State> sealed::Sealed for SetPlaintext<S> {}
469469 impl<S: State> State for SetPlaintext<S> {
470470- type CreatedAt = S::CreatedAt;
470470+ type Subject = S::Subject;
471471 type Plaintext = Set<members::plaintext>;
472472+ type CreatedAt = S::CreatedAt;
473473+ }
474474+ ///State transition - sets the `created_at` field to Set
475475+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
476476+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
477477+ impl<S: State> State for SetCreatedAt<S> {
472478 type Subject = S::Subject;
473473- }
474474- ///State transition - sets the `subject` field to Set
475475- pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
476476- impl<S: State> sealed::Sealed for SetSubject<S> {}
477477- impl<S: State> State for SetSubject<S> {
478478- type CreatedAt = S::CreatedAt;
479479 type Plaintext = S::Plaintext;
480480- type Subject = Set<members::subject>;
480480+ type CreatedAt = Set<members::created_at>;
481481 }
482482 /// Marker types for field names
483483 #[allow(non_camel_case_types)]
484484 pub mod members {
485485- ///Marker type for the `created_at` field
486486- pub struct created_at(());
487487- ///Marker type for the `plaintext` field
488488- pub struct plaintext(());
489485 ///Marker type for the `subject` field
490486 pub struct subject(());
487487+ ///Marker type for the `plaintext` field
488488+ pub struct plaintext(());
489489+ ///Marker type for the `created_at` field
490490+ pub struct created_at(());
491491 }
492492}
493493···657657impl<'a, S> CommentBuilder<'a, S>
658658where
659659 S: comment_state::State,
660660- S::CreatedAt: comment_state::IsSet,
661661- S::Plaintext: comment_state::IsSet,
662660 S::Subject: comment_state::IsSet,
661661+ S::Plaintext: comment_state::IsSet,
662662+ S::CreatedAt: comment_state::IsSet,
663663{
664664 /// Build the final struct
665665 pub fn build(self) -> Comment<'a> {
+24-24
crates/weaver-api/src/pub_leaflet/document.rs
···5555 }
5656 /// State trait tracking which required fields have been set
5757 pub trait State: sealed::Sealed {
5858- type Pages;
5959- type Author;
6058 type Title;
5959+ type Author;
6060+ type Pages;
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 Title = Unset;
6767+ type Author = Unset;
6668 type Pages = Unset;
6767- type Author = Unset;
6868- type Title = Unset;
6969 }
7070- ///State transition - sets the `pages` field to Set
7171- pub struct SetPages<S: State = Empty>(PhantomData<fn() -> S>);
7272- impl<S: State> sealed::Sealed for SetPages<S> {}
7373- impl<S: State> State for SetPages<S> {
7474- type Pages = Set<members::pages>;
7070+ ///State transition - sets the `title` field to Set
7171+ pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
7272+ impl<S: State> sealed::Sealed for SetTitle<S> {}
7373+ impl<S: State> State for SetTitle<S> {
7474+ type Title = Set<members::title>;
7575 type Author = S::Author;
7676- type Title = S::Title;
7676+ type Pages = S::Pages;
7777 }
7878 ///State transition - sets the `author` field to Set
7979 pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
8080 impl<S: State> sealed::Sealed for SetAuthor<S> {}
8181 impl<S: State> State for SetAuthor<S> {
8282- type Pages = S::Pages;
8383- type Author = Set<members::author>;
8482 type Title = S::Title;
8383+ type Author = Set<members::author>;
8484+ type Pages = S::Pages;
8585 }
8686- ///State transition - sets the `title` field to Set
8787- pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
8888- impl<S: State> sealed::Sealed for SetTitle<S> {}
8989- impl<S: State> State for SetTitle<S> {
9090- type Pages = S::Pages;
8686+ ///State transition - sets the `pages` field to Set
8787+ pub struct SetPages<S: State = Empty>(PhantomData<fn() -> S>);
8888+ impl<S: State> sealed::Sealed for SetPages<S> {}
8989+ impl<S: State> State for SetPages<S> {
9090+ type Title = S::Title;
9191 type Author = S::Author;
9292- type Title = Set<members::title>;
9292+ type Pages = Set<members::pages>;
9393 }
9494 /// Marker types for field names
9595 #[allow(non_camel_case_types)]
9696 pub mod members {
9797+ ///Marker type for the `title` field
9898+ pub struct title(());
9999+ ///Marker type for the `author` field
100100+ pub struct author(());
97101 ///Marker type for the `pages` field
98102 pub struct pages(());
9999- ///Marker type for the `author` field
100100- pub struct author(());
101101- ///Marker type for the `title` field
102102- pub struct title(());
103103 }
104104}
105105···322322impl<'a, S> DocumentBuilder<'a, S>
323323where
324324 S: document_state::State,
325325- S::Pages: document_state::IsSet,
326326- S::Author: document_state::IsSet,
327325 S::Title: document_state::IsSet,
326326+ S::Author: document_state::IsSet,
327327+ S::Pages: document_state::IsSet,
328328{
329329 /// Build the final struct
330330 pub fn build(self) -> Document<'a> {
+30-30
crates/weaver-api/src/pub_leaflet/pages/canvas.rs
···3939 }
4040 /// State trait tracking which required fields have been set
4141 pub trait State: sealed::Sealed {
4242+ type Y;
4243 type X;
4344 type Block;
4445 type Width;
4545- type Y;
4646 }
4747 /// Empty state - all required fields are unset
4848 pub struct Empty(());
4949 impl sealed::Sealed for Empty {}
5050 impl State for Empty {
5151+ type Y = Unset;
5152 type X = Unset;
5253 type Block = Unset;
5354 type Width = Unset;
5454- type Y = Unset;
5555+ }
5656+ ///State transition - sets the `y` field to Set
5757+ pub struct SetY<S: State = Empty>(PhantomData<fn() -> S>);
5858+ impl<S: State> sealed::Sealed for SetY<S> {}
5959+ impl<S: State> State for SetY<S> {
6060+ type Y = Set<members::y>;
6161+ type X = S::X;
6262+ type Block = S::Block;
6363+ type Width = S::Width;
5564 }
5665 ///State transition - sets the `x` field to Set
5766 pub struct SetX<S: State = Empty>(PhantomData<fn() -> S>);
5867 impl<S: State> sealed::Sealed for SetX<S> {}
5968 impl<S: State> State for SetX<S> {
6969+ type Y = S::Y;
6070 type X = Set<members::x>;
6171 type Block = S::Block;
6272 type Width = S::Width;
6363- type Y = S::Y;
6473 }
6574 ///State transition - sets the `block` field to Set
6675 pub struct SetBlock<S: State = Empty>(PhantomData<fn() -> S>);
6776 impl<S: State> sealed::Sealed for SetBlock<S> {}
6877 impl<S: State> State for SetBlock<S> {
7878+ type Y = S::Y;
6979 type X = S::X;
7080 type Block = Set<members::block>;
7181 type Width = S::Width;
7272- type Y = S::Y;
7382 }
7483 ///State transition - sets the `width` field to Set
7584 pub struct SetWidth<S: State = Empty>(PhantomData<fn() -> S>);
7685 impl<S: State> sealed::Sealed for SetWidth<S> {}
7786 impl<S: State> State for SetWidth<S> {
7878- type X = S::X;
7979- type Block = S::Block;
8080- type Width = Set<members::width>;
8187 type Y = S::Y;
8282- }
8383- ///State transition - sets the `y` field to Set
8484- pub struct SetY<S: State = Empty>(PhantomData<fn() -> S>);
8585- impl<S: State> sealed::Sealed for SetY<S> {}
8686- impl<S: State> State for SetY<S> {
8788 type X = S::X;
8889 type Block = S::Block;
8989- type Width = S::Width;
9090- type Y = Set<members::y>;
9090+ type Width = Set<members::width>;
9191 }
9292 /// Marker types for field names
9393 #[allow(non_camel_case_types)]
9494 pub mod members {
9595+ ///Marker type for the `y` field
9696+ pub struct y(());
9597 ///Marker type for the `x` field
9698 pub struct x(());
9799 ///Marker type for the `block` field
98100 pub struct block(());
99101 ///Marker type for the `width` field
100102 pub struct width(());
101101- ///Marker type for the `y` field
102102- pub struct y(());
103103 }
104104}
105105···234234impl<'a, S> BlockBuilder<'a, S>
235235where
236236 S: block_state::State,
237237+ S::Y: block_state::IsSet,
237238 S::X: block_state::IsSet,
238239 S::Block: block_state::IsSet,
239240 S::Width: block_state::IsSet,
240240- S::Y: block_state::IsSet,
241241{
242242 /// Build the final struct
243243 pub fn build(self) -> Block<'a> {
···764764 }
765765 /// State trait tracking which required fields have been set
766766 pub trait State: sealed::Sealed {
767767- type Offset;
768767 type Block;
768768+ type Offset;
769769 }
770770 /// Empty state - all required fields are unset
771771 pub struct Empty(());
772772 impl sealed::Sealed for Empty {}
773773 impl State for Empty {
774774- type Offset = Unset;
775774 type Block = Unset;
776776- }
777777- ///State transition - sets the `offset` field to Set
778778- pub struct SetOffset<S: State = Empty>(PhantomData<fn() -> S>);
779779- impl<S: State> sealed::Sealed for SetOffset<S> {}
780780- impl<S: State> State for SetOffset<S> {
781781- type Offset = Set<members::offset>;
782782- type Block = S::Block;
775775+ type Offset = Unset;
783776 }
784777 ///State transition - sets the `block` field to Set
785778 pub struct SetBlock<S: State = Empty>(PhantomData<fn() -> S>);
786779 impl<S: State> sealed::Sealed for SetBlock<S> {}
787780 impl<S: State> State for SetBlock<S> {
788788- type Offset = S::Offset;
789781 type Block = Set<members::block>;
782782+ type Offset = S::Offset;
783783+ }
784784+ ///State transition - sets the `offset` field to Set
785785+ pub struct SetOffset<S: State = Empty>(PhantomData<fn() -> S>);
786786+ impl<S: State> sealed::Sealed for SetOffset<S> {}
787787+ impl<S: State> State for SetOffset<S> {
788788+ type Block = S::Block;
789789+ type Offset = Set<members::offset>;
790790 }
791791 /// Marker types for field names
792792 #[allow(non_camel_case_types)]
793793 pub mod members {
794794- ///Marker type for the `offset` field
795795- pub struct offset(());
796794 ///Marker type for the `block` field
797795 pub struct block(());
796796+ ///Marker type for the `offset` field
797797+ pub struct offset(());
798798 }
799799}
800800···867867impl<'a, S> PositionBuilder<'a, S>
868868where
869869 S: position_state::State,
870870- S::Offset: position_state::IsSet,
871870 S::Block: position_state::IsSet,
871871+ S::Offset: position_state::IsSet,
872872{
873873 /// Build the final struct
874874 pub fn build(self) -> Position<'a> {
···876876 }
877877 /// State trait tracking which required fields have been set
878878 pub trait State: sealed::Sealed {
879879- type Start;
880879 type End;
880880+ type Start;
881881 }
882882 /// Empty state - all required fields are unset
883883 pub struct Empty(());
884884 impl sealed::Sealed for Empty {}
885885 impl State for Empty {
886886- type Start = Unset;
887886 type End = Unset;
888888- }
889889- ///State transition - sets the `start` field to Set
890890- pub struct SetStart<S: State = Empty>(PhantomData<fn() -> S>);
891891- impl<S: State> sealed::Sealed for SetStart<S> {}
892892- impl<S: State> State for SetStart<S> {
893893- type Start = Set<members::start>;
894894- type End = S::End;
887887+ type Start = Unset;
895888 }
896889 ///State transition - sets the `end` field to Set
897890 pub struct SetEnd<S: State = Empty>(PhantomData<fn() -> S>);
898891 impl<S: State> sealed::Sealed for SetEnd<S> {}
899892 impl<S: State> State for SetEnd<S> {
900900- type Start = S::Start;
901893 type End = Set<members::end>;
894894+ type Start = S::Start;
895895+ }
896896+ ///State transition - sets the `start` field to Set
897897+ pub struct SetStart<S: State = Empty>(PhantomData<fn() -> S>);
898898+ impl<S: State> sealed::Sealed for SetStart<S> {}
899899+ impl<S: State> State for SetStart<S> {
900900+ type End = S::End;
901901+ type Start = Set<members::start>;
902902 }
903903 /// Marker types for field names
904904 #[allow(non_camel_case_types)]
905905 pub mod members {
906906- ///Marker type for the `start` field
907907- pub struct start(());
908906 ///Marker type for the `end` field
909907 pub struct end(());
908908+ ///Marker type for the `start` field
909909+ pub struct start(());
910910 }
911911}
912912···979979impl<'a, S> QuoteBuilder<'a, S>
980980where
981981 S: quote_state::State,
982982- S::Start: quote_state::IsSet,
983982 S::End: quote_state::IsSet,
983983+ S::Start: quote_state::IsSet,
984984{
985985 /// Build the final struct
986986 pub fn build(self) -> Quote<'a> {
+13-13
crates/weaver-api/src/pub_leaflet/poll/vote.rs
···3434 }
3535 /// State trait tracking which required fields have been set
3636 pub trait State: sealed::Sealed {
3737- type Poll;
3837 type Option;
3838+ type Poll;
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 Poll = Unset;
4544 type Option = Unset;
4646- }
4747- ///State transition - sets the `poll` field to Set
4848- pub struct SetPoll<S: State = Empty>(PhantomData<fn() -> S>);
4949- impl<S: State> sealed::Sealed for SetPoll<S> {}
5050- impl<S: State> State for SetPoll<S> {
5151- type Poll = Set<members::poll>;
5252- type Option = S::Option;
4545+ type Poll = Unset;
5346 }
5447 ///State transition - sets the `option` field to Set
5548 pub struct SetOption<S: State = Empty>(PhantomData<fn() -> S>);
5649 impl<S: State> sealed::Sealed for SetOption<S> {}
5750 impl<S: State> State for SetOption<S> {
5858- type Poll = S::Poll;
5951 type Option = Set<members::option>;
5252+ type Poll = S::Poll;
5353+ }
5454+ ///State transition - sets the `poll` field to Set
5555+ pub struct SetPoll<S: State = Empty>(PhantomData<fn() -> S>);
5656+ impl<S: State> sealed::Sealed for SetPoll<S> {}
5757+ impl<S: State> State for SetPoll<S> {
5858+ type Option = S::Option;
5959+ type Poll = Set<members::poll>;
6060 }
6161 /// Marker types for field names
6262 #[allow(non_camel_case_types)]
6363 pub mod members {
6464- ///Marker type for the `poll` field
6565- pub struct poll(());
6664 ///Marker type for the `option` field
6765 pub struct option(());
6666+ ///Marker type for the `poll` field
6767+ pub struct poll(());
6868 }
6969}
7070···137137impl<'a, S> VoteBuilder<'a, S>
138138where
139139 S: vote_state::State,
140140- S::Poll: vote_state::IsSet,
141140 S::Option: vote_state::IsSet,
141141+ S::Poll: vote_state::IsSet,
142142{
143143 /// Build the final struct
144144 pub fn build(self) -> Vote<'a> {
···556556 }
557557 /// State trait tracking which required fields have been set
558558 pub trait State: sealed::Sealed {
559559- type ByteStart;
560559 type ByteEnd;
560560+ type ByteStart;
561561 }
562562 /// Empty state - all required fields are unset
563563 pub struct Empty(());
564564 impl sealed::Sealed for Empty {}
565565 impl State for Empty {
566566- type ByteStart = Unset;
567566 type ByteEnd = Unset;
568568- }
569569- ///State transition - sets the `byte_start` field to Set
570570- pub struct SetByteStart<S: State = Empty>(PhantomData<fn() -> S>);
571571- impl<S: State> sealed::Sealed for SetByteStart<S> {}
572572- impl<S: State> State for SetByteStart<S> {
573573- type ByteStart = Set<members::byte_start>;
574574- type ByteEnd = S::ByteEnd;
567567+ type ByteStart = Unset;
575568 }
576569 ///State transition - sets the `byte_end` field to Set
577570 pub struct SetByteEnd<S: State = Empty>(PhantomData<fn() -> S>);
578571 impl<S: State> sealed::Sealed for SetByteEnd<S> {}
579572 impl<S: State> State for SetByteEnd<S> {
580580- type ByteStart = S::ByteStart;
581573 type ByteEnd = Set<members::byte_end>;
574574+ type ByteStart = S::ByteStart;
575575+ }
576576+ ///State transition - sets the `byte_start` field to Set
577577+ pub struct SetByteStart<S: State = Empty>(PhantomData<fn() -> S>);
578578+ impl<S: State> sealed::Sealed for SetByteStart<S> {}
579579+ impl<S: State> State for SetByteStart<S> {
580580+ type ByteEnd = S::ByteEnd;
581581+ type ByteStart = Set<members::byte_start>;
582582 }
583583 /// Marker types for field names
584584 #[allow(non_camel_case_types)]
585585 pub mod members {
586586- ///Marker type for the `byte_start` field
587587- pub struct byte_start(());
588586 ///Marker type for the `byte_end` field
589587 pub struct byte_end(());
588588+ ///Marker type for the `byte_start` field
589589+ pub struct byte_start(());
590590 }
591591}
592592···656656impl<'a, S> ByteSliceBuilder<'a, S>
657657where
658658 S: byte_slice_state::State,
659659- S::ByteStart: byte_slice_state::IsSet,
660659 S::ByteEnd: byte_slice_state::IsSet,
660660+ S::ByteStart: byte_slice_state::IsSet,
661661{
662662 /// Build the final struct
663663 pub fn build(self) -> ByteSlice<'a> {
···10561056 }
10571057 /// State trait tracking which required fields have been set
10581058 pub trait State: sealed::Sealed {
10591059- type Index;
10601059 type Features;
10601060+ type Index;
10611061 }
10621062 /// Empty state - all required fields are unset
10631063 pub struct Empty(());
10641064 impl sealed::Sealed for Empty {}
10651065 impl State for Empty {
10661066- type Index = Unset;
10671066 type Features = Unset;
10681068- }
10691069- ///State transition - sets the `index` field to Set
10701070- pub struct SetIndex<S: State = Empty>(PhantomData<fn() -> S>);
10711071- impl<S: State> sealed::Sealed for SetIndex<S> {}
10721072- impl<S: State> State for SetIndex<S> {
10731073- type Index = Set<members::index>;
10741074- type Features = S::Features;
10671067+ type Index = Unset;
10751068 }
10761069 ///State transition - sets the `features` field to Set
10771070 pub struct SetFeatures<S: State = Empty>(PhantomData<fn() -> S>);
10781071 impl<S: State> sealed::Sealed for SetFeatures<S> {}
10791072 impl<S: State> State for SetFeatures<S> {
10801080- type Index = S::Index;
10811073 type Features = Set<members::features>;
10741074+ type Index = S::Index;
10751075+ }
10761076+ ///State transition - sets the `index` field to Set
10771077+ pub struct SetIndex<S: State = Empty>(PhantomData<fn() -> S>);
10781078+ impl<S: State> sealed::Sealed for SetIndex<S> {}
10791079+ impl<S: State> State for SetIndex<S> {
10801080+ type Features = S::Features;
10811081+ type Index = Set<members::index>;
10821082 }
10831083 /// Marker types for field names
10841084 #[allow(non_camel_case_types)]
10851085 pub mod members {
10861086- ///Marker type for the `index` field
10871087- pub struct index(());
10881086 ///Marker type for the `features` field
10891087 pub struct features(());
10881088+ ///Marker type for the `index` field
10891089+ pub struct index(());
10901090 }
10911091}
10921092···11591159impl<'a, S> FacetBuilder<'a, S>
11601160where
11611161 S: facet_state::State,
11621162- S::Index: facet_state::IsSet,
11631162 S::Features: facet_state::IsSet,
11631163+ S::Index: facet_state::IsSet,
11641164{
11651165 /// Build the final struct
11661166 pub fn build(self) -> Facet<'a> {
+39-39
crates/weaver-api/src/pub_leaflet/theme/color.rs
···438438 }
439439 /// State trait tracking which required fields have been set
440440 pub trait State: sealed::Sealed {
441441+ type G;
442442+ type B;
443443+ type A;
441444 type R;
442442- type A;
443443- type B;
444444- type G;
445445 }
446446 /// Empty state - all required fields are unset
447447 pub struct Empty(());
448448 impl sealed::Sealed for Empty {}
449449 impl State for Empty {
450450- type R = Unset;
451451- type A = Unset;
452452- type B = Unset;
453450 type G = Unset;
451451+ type B = Unset;
452452+ type A = Unset;
453453+ type R = Unset;
454454 }
455455- ///State transition - sets the `r` field to Set
456456- pub struct SetR<S: State = Empty>(PhantomData<fn() -> S>);
457457- impl<S: State> sealed::Sealed for SetR<S> {}
458458- impl<S: State> State for SetR<S> {
459459- type R = Set<members::r>;
460460- type A = S::A;
455455+ ///State transition - sets the `g` field to Set
456456+ pub struct SetG<S: State = Empty>(PhantomData<fn() -> S>);
457457+ impl<S: State> sealed::Sealed for SetG<S> {}
458458+ impl<S: State> State for SetG<S> {
459459+ type G = Set<members::g>;
461460 type B = S::B;
462462- type G = S::G;
463463- }
464464- ///State transition - sets the `a` field to Set
465465- pub struct SetA<S: State = Empty>(PhantomData<fn() -> S>);
466466- impl<S: State> sealed::Sealed for SetA<S> {}
467467- impl<S: State> State for SetA<S> {
461461+ type A = S::A;
468462 type R = S::R;
469469- type A = Set<members::a>;
470470- type B = S::B;
471471- type G = S::G;
472463 }
473464 ///State transition - sets the `b` field to Set
474465 pub struct SetB<S: State = Empty>(PhantomData<fn() -> S>);
475466 impl<S: State> sealed::Sealed for SetB<S> {}
476467 impl<S: State> State for SetB<S> {
477477- type R = S::R;
478478- type A = S::A;
479479- type B = Set<members::b>;
480468 type G = S::G;
469469+ type B = Set<members::b>;
470470+ type A = S::A;
471471+ type R = S::R;
481472 }
482482- ///State transition - sets the `g` field to Set
483483- pub struct SetG<S: State = Empty>(PhantomData<fn() -> S>);
484484- impl<S: State> sealed::Sealed for SetG<S> {}
485485- impl<S: State> State for SetG<S> {
473473+ ///State transition - sets the `a` field to Set
474474+ pub struct SetA<S: State = Empty>(PhantomData<fn() -> S>);
475475+ impl<S: State> sealed::Sealed for SetA<S> {}
476476+ impl<S: State> State for SetA<S> {
477477+ type G = S::G;
478478+ type B = S::B;
479479+ type A = Set<members::a>;
486480 type R = S::R;
487487- type A = S::A;
481481+ }
482482+ ///State transition - sets the `r` field to Set
483483+ pub struct SetR<S: State = Empty>(PhantomData<fn() -> S>);
484484+ impl<S: State> sealed::Sealed for SetR<S> {}
485485+ impl<S: State> State for SetR<S> {
486486+ type G = S::G;
488487 type B = S::B;
489489- type G = Set<members::g>;
488488+ type A = S::A;
489489+ type R = Set<members::r>;
490490 }
491491 /// Marker types for field names
492492 #[allow(non_camel_case_types)]
493493 pub mod members {
494494- ///Marker type for the `r` field
495495- pub struct r(());
496496- ///Marker type for the `a` field
497497- pub struct a(());
494494+ ///Marker type for the `g` field
495495+ pub struct g(());
498496 ///Marker type for the `b` field
499497 pub struct b(());
500500- ///Marker type for the `g` field
501501- pub struct g(());
498498+ ///Marker type for the `a` field
499499+ pub struct a(());
500500+ ///Marker type for the `r` field
501501+ pub struct r(());
502502 }
503503}
504504···599599impl<'a, S> RgbaBuilder<'a, S>
600600where
601601 S: rgba_state::State,
602602- S::R: rgba_state::IsSet,
603603- S::A: rgba_state::IsSet,
604604- S::B: rgba_state::IsSet,
605602 S::G: rgba_state::IsSet,
603603+ S::B: rgba_state::IsSet,
604604+ S::A: rgba_state::IsSet,
605605+ S::R: rgba_state::IsSet,
606606{
607607 /// Build the final struct
608608 pub fn build(self) -> Rgba<'a> {
+1
crates/weaver-api/src/sh_weaver.rs
···5566pub mod actor;
77pub mod collab;
88+pub mod domain;
89pub mod edit;
910pub mod embed;
1011pub mod graph;
+28-28
crates/weaver-api/src/sh_weaver/actor.rs
···26232623 }
26242624 /// State trait tracking which required fields have been set
26252625 pub trait State: sealed::Sealed {
26262626- type Did;
26272626 type Handle;
26272627+ type Did;
26282628 }
26292629 /// Empty state - all required fields are unset
26302630 pub struct Empty(());
26312631 impl sealed::Sealed for Empty {}
26322632 impl State for Empty {
26332633- type Did = Unset;
26342633 type Handle = Unset;
26352635- }
26362636- ///State transition - sets the `did` field to Set
26372637- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
26382638- impl<S: State> sealed::Sealed for SetDid<S> {}
26392639- impl<S: State> State for SetDid<S> {
26402640- type Did = Set<members::did>;
26412641- type Handle = S::Handle;
26342634+ type Did = Unset;
26422635 }
26432636 ///State transition - sets the `handle` field to Set
26442637 pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
26452638 impl<S: State> sealed::Sealed for SetHandle<S> {}
26462639 impl<S: State> State for SetHandle<S> {
26472647- type Did = S::Did;
26482640 type Handle = Set<members::handle>;
26412641+ type Did = S::Did;
26422642+ }
26432643+ ///State transition - sets the `did` field to Set
26442644+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
26452645+ impl<S: State> sealed::Sealed for SetDid<S> {}
26462646+ impl<S: State> State for SetDid<S> {
26472647+ type Handle = S::Handle;
26482648+ type Did = Set<members::did>;
26492649 }
26502650 /// Marker types for field names
26512651 #[allow(non_camel_case_types)]
26522652 pub mod members {
26532653- ///Marker type for the `did` field
26542654- pub struct did(());
26552653 ///Marker type for the `handle` field
26562654 pub struct handle(());
26552655+ ///Marker type for the `did` field
26562656+ pub struct did(());
26572657 }
26582658}
26592659···28462846impl<'a, S> ProfileViewBasicBuilder<'a, S>
28472847where
28482848 S: profile_view_basic_state::State,
28492849- S::Did: profile_view_basic_state::IsSet,
28502849 S::Handle: profile_view_basic_state::IsSet,
28502850+ S::Did: profile_view_basic_state::IsSet,
28512851{
28522852 /// Build the final struct
28532853 pub fn build(self) -> ProfileViewBasic<'a> {
···31663166 }
31673167 /// State trait tracking which required fields have been set
31683168 pub trait State: sealed::Sealed {
31693169- type Did;
31703169 type Handle;
31703170+ type Did;
31713171 type Bluesky;
31723172 }
31733173 /// Empty state - all required fields are unset
31743174 pub struct Empty(());
31753175 impl sealed::Sealed for Empty {}
31763176 impl State for Empty {
31773177- type Did = Unset;
31783177 type Handle = Unset;
31783178+ type Did = Unset;
31793179 type Bluesky = Unset;
31803180 }
31813181- ///State transition - sets the `did` field to Set
31823182- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
31833183- impl<S: State> sealed::Sealed for SetDid<S> {}
31843184- impl<S: State> State for SetDid<S> {
31853185- type Did = Set<members::did>;
31863186- type Handle = S::Handle;
31873187- type Bluesky = S::Bluesky;
31883188- }
31893181 ///State transition - sets the `handle` field to Set
31903182 pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
31913183 impl<S: State> sealed::Sealed for SetHandle<S> {}
31923184 impl<S: State> State for SetHandle<S> {
31933193- type Did = S::Did;
31943185 type Handle = Set<members::handle>;
31863186+ type Did = S::Did;
31873187+ type Bluesky = S::Bluesky;
31883188+ }
31893189+ ///State transition - sets the `did` field to Set
31903190+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
31913191+ impl<S: State> sealed::Sealed for SetDid<S> {}
31923192+ impl<S: State> State for SetDid<S> {
31933193+ type Handle = S::Handle;
31943194+ type Did = Set<members::did>;
31953195 type Bluesky = S::Bluesky;
31963196 }
31973197 ///State transition - sets the `bluesky` field to Set
31983198 pub struct SetBluesky<S: State = Empty>(PhantomData<fn() -> S>);
31993199 impl<S: State> sealed::Sealed for SetBluesky<S> {}
32003200 impl<S: State> State for SetBluesky<S> {
32013201- type Did = S::Did;
32023201 type Handle = S::Handle;
32023202+ type Did = S::Did;
32033203 type Bluesky = Set<members::bluesky>;
32043204 }
32053205 /// Marker types for field names
32063206 #[allow(non_camel_case_types)]
32073207 pub mod members {
32083208- ///Marker type for the `did` field
32093209- pub struct did(());
32103208 ///Marker type for the `handle` field
32113209 pub struct handle(());
32103210+ ///Marker type for the `did` field
32113211+ pub struct did(());
32123212 ///Marker type for the `bluesky` field
32133213 pub struct bluesky(());
32143214 }
···34003400impl<'a, S> TangledProfileViewBuilder<'a, S>
34013401where
34023402 S: tangled_profile_view_state::State,
34033403- S::Did: tangled_profile_view_state::IsSet,
34043403 S::Handle: tangled_profile_view_state::IsSet,
34043404+ S::Did: tangled_profile_view_state::IsSet,
34053405 S::Bluesky: tangled_profile_view_state::IsSet,
34063406{
34073407 /// Build the final struct
+143-143
crates/weaver-api/src/sh_weaver/collab.rs
···9494 }
9595 /// State trait tracking which required fields have been set
9696 pub trait State: sealed::Sealed {
9797- type Resource;
9898- type Status;
9997 type Participants;
9898+ type Status;
9999+ type Resource;
100100 }
101101 /// Empty state - all required fields are unset
102102 pub struct Empty(());
103103 impl sealed::Sealed for Empty {}
104104 impl State for Empty {
105105+ type Participants = Unset;
106106+ type Status = Unset;
105107 type Resource = Unset;
106106- type Status = Unset;
107107- type Participants = Unset;
108108 }
109109- ///State transition - sets the `resource` field to Set
110110- pub struct SetResource<S: State = Empty>(PhantomData<fn() -> S>);
111111- impl<S: State> sealed::Sealed for SetResource<S> {}
112112- impl<S: State> State for SetResource<S> {
113113- type Resource = Set<members::resource>;
109109+ ///State transition - sets the `participants` field to Set
110110+ pub struct SetParticipants<S: State = Empty>(PhantomData<fn() -> S>);
111111+ impl<S: State> sealed::Sealed for SetParticipants<S> {}
112112+ impl<S: State> State for SetParticipants<S> {
113113+ type Participants = Set<members::participants>;
114114 type Status = S::Status;
115115- type Participants = S::Participants;
115115+ type Resource = S::Resource;
116116 }
117117 ///State transition - sets the `status` field to Set
118118 pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
119119 impl<S: State> sealed::Sealed for SetStatus<S> {}
120120 impl<S: State> State for SetStatus<S> {
121121- type Resource = S::Resource;
122122- type Status = Set<members::status>;
123121 type Participants = S::Participants;
122122+ type Status = Set<members::status>;
123123+ type Resource = S::Resource;
124124 }
125125- ///State transition - sets the `participants` field to Set
126126- pub struct SetParticipants<S: State = Empty>(PhantomData<fn() -> S>);
127127- impl<S: State> sealed::Sealed for SetParticipants<S> {}
128128- impl<S: State> State for SetParticipants<S> {
129129- type Resource = S::Resource;
125125+ ///State transition - sets the `resource` field to Set
126126+ pub struct SetResource<S: State = Empty>(PhantomData<fn() -> S>);
127127+ impl<S: State> sealed::Sealed for SetResource<S> {}
128128+ impl<S: State> State for SetResource<S> {
129129+ type Participants = S::Participants;
130130 type Status = S::Status;
131131- type Participants = Set<members::participants>;
131131+ type Resource = Set<members::resource>;
132132 }
133133 /// Marker types for field names
134134 #[allow(non_camel_case_types)]
135135 pub mod members {
136136+ ///Marker type for the `participants` field
137137+ pub struct participants(());
138138+ ///Marker type for the `status` field
139139+ pub struct status(());
136140 ///Marker type for the `resource` field
137141 pub struct resource(());
138138- ///Marker type for the `status` field
139139- pub struct status(());
140140- ///Marker type for the `participants` field
141141- pub struct participants(());
142142 }
143143}
144144···426426impl<'a, S> CollaborationStateViewBuilder<'a, S>
427427where
428428 S: collaboration_state_view_state::State,
429429- S::Resource: collaboration_state_view_state::IsSet,
430430- S::Status: collaboration_state_view_state::IsSet,
431429 S::Participants: collaboration_state_view_state::IsSet,
430430+ S::Status: collaboration_state_view_state::IsSet,
431431+ S::Resource: collaboration_state_view_state::IsSet,
432432{
433433 /// Build the final struct
434434 pub fn build(self) -> CollaborationStateView<'a> {
···16121612 pub trait State: sealed::Sealed {
16131613 type EndReason;
16141614 type WasActiveFrom;
16151615- type WasActiveUntil;
16161615 type User;
16161616+ type WasActiveUntil;
16171617 }
16181618 /// Empty state - all required fields are unset
16191619 pub struct Empty(());
···16211621 impl State for Empty {
16221622 type EndReason = Unset;
16231623 type WasActiveFrom = Unset;
16241624- type WasActiveUntil = Unset;
16251624 type User = Unset;
16251625+ type WasActiveUntil = Unset;
16261626 }
16271627 ///State transition - sets the `end_reason` field to Set
16281628 pub struct SetEndReason<S: State = Empty>(PhantomData<fn() -> S>);
···16301630 impl<S: State> State for SetEndReason<S> {
16311631 type EndReason = Set<members::end_reason>;
16321632 type WasActiveFrom = S::WasActiveFrom;
16331633- type WasActiveUntil = S::WasActiveUntil;
16341633 type User = S::User;
16341634+ type WasActiveUntil = S::WasActiveUntil;
16351635 }
16361636 ///State transition - sets the `was_active_from` field to Set
16371637 pub struct SetWasActiveFrom<S: State = Empty>(PhantomData<fn() -> S>);
···16391639 impl<S: State> State for SetWasActiveFrom<S> {
16401640 type EndReason = S::EndReason;
16411641 type WasActiveFrom = Set<members::was_active_from>;
16421642- type WasActiveUntil = S::WasActiveUntil;
16431642 type User = S::User;
16441644- }
16451645- ///State transition - sets the `was_active_until` field to Set
16461646- pub struct SetWasActiveUntil<S: State = Empty>(PhantomData<fn() -> S>);
16471647- impl<S: State> sealed::Sealed for SetWasActiveUntil<S> {}
16481648- impl<S: State> State for SetWasActiveUntil<S> {
16491649- type EndReason = S::EndReason;
16501650- type WasActiveFrom = S::WasActiveFrom;
16511651- type WasActiveUntil = Set<members::was_active_until>;
16521652- type User = S::User;
16431643+ type WasActiveUntil = S::WasActiveUntil;
16531644 }
16541645 ///State transition - sets the `user` field to Set
16551646 pub struct SetUser<S: State = Empty>(PhantomData<fn() -> S>);
···16571648 impl<S: State> State for SetUser<S> {
16581649 type EndReason = S::EndReason;
16591650 type WasActiveFrom = S::WasActiveFrom;
16601660- type WasActiveUntil = S::WasActiveUntil;
16611651 type User = Set<members::user>;
16521652+ type WasActiveUntil = S::WasActiveUntil;
16531653+ }
16541654+ ///State transition - sets the `was_active_until` field to Set
16551655+ pub struct SetWasActiveUntil<S: State = Empty>(PhantomData<fn() -> S>);
16561656+ impl<S: State> sealed::Sealed for SetWasActiveUntil<S> {}
16571657+ impl<S: State> State for SetWasActiveUntil<S> {
16581658+ type EndReason = S::EndReason;
16591659+ type WasActiveFrom = S::WasActiveFrom;
16601660+ type User = S::User;
16611661+ type WasActiveUntil = Set<members::was_active_until>;
16621662 }
16631663 /// Marker types for field names
16641664 #[allow(non_camel_case_types)]
···16671667 pub struct end_reason(());
16681668 ///Marker type for the `was_active_from` field
16691669 pub struct was_active_from(());
16701670+ ///Marker type for the `user` field
16711671+ pub struct user(());
16701672 ///Marker type for the `was_active_until` field
16711673 pub struct was_active_until(());
16721672- ///Marker type for the `user` field
16731673- pub struct user(());
16741674 }
16751675}
16761676···18451845 S: former_collaborator_view_state::State,
18461846 S::EndReason: former_collaborator_view_state::IsSet,
18471847 S::WasActiveFrom: former_collaborator_view_state::IsSet,
18481848- S::WasActiveUntil: former_collaborator_view_state::IsSet,
18491848 S::User: former_collaborator_view_state::IsSet,
18491849+ S::WasActiveUntil: former_collaborator_view_state::IsSet,
18501850{
18511851 /// Build the final struct
18521852 pub fn build(self) -> FormerCollaboratorView<'a> {
···20612061 }
20622062 /// State trait tracking which required fields have been set
20632063 pub trait State: sealed::Sealed {
20642064- type Resource;
20652065- type Invitee;
20662066- type Cid;
20672067- type CreatedAt;
20682064 type Status;
20692065 type Uri;
20702066 type Inviter;
20672067+ type Invitee;
20682068+ type Cid;
20692069+ type Resource;
20702070+ type CreatedAt;
20712071 }
20722072 /// Empty state - all required fields are unset
20732073 pub struct Empty(());
20742074 impl sealed::Sealed for Empty {}
20752075 impl State for Empty {
20762076- type Resource = Unset;
20762076+ type Status = Unset;
20772077+ type Uri = Unset;
20782078+ type Inviter = Unset;
20772079 type Invitee = Unset;
20782080 type Cid = Unset;
20812081+ type Resource = Unset;
20792082 type CreatedAt = Unset;
20802080- type Status = Unset;
20812081- type Uri = Unset;
20822082- type Inviter = Unset;
20832083+ }
20842084+ ///State transition - sets the `status` field to Set
20852085+ pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
20862086+ impl<S: State> sealed::Sealed for SetStatus<S> {}
20872087+ impl<S: State> State for SetStatus<S> {
20882088+ type Status = Set<members::status>;
20892089+ type Uri = S::Uri;
20902090+ type Inviter = S::Inviter;
20912091+ type Invitee = S::Invitee;
20922092+ type Cid = S::Cid;
20932093+ type Resource = S::Resource;
20942094+ type CreatedAt = S::CreatedAt;
20832095 }
20842084- ///State transition - sets the `resource` field to Set
20852085- pub struct SetResource<S: State = Empty>(PhantomData<fn() -> S>);
20862086- impl<S: State> sealed::Sealed for SetResource<S> {}
20872087- impl<S: State> State for SetResource<S> {
20882088- type Resource = Set<members::resource>;
20962096+ ///State transition - sets the `uri` field to Set
20972097+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
20982098+ impl<S: State> sealed::Sealed for SetUri<S> {}
20992099+ impl<S: State> State for SetUri<S> {
21002100+ type Status = S::Status;
21012101+ type Uri = Set<members::uri>;
21022102+ type Inviter = S::Inviter;
20892103 type Invitee = S::Invitee;
20902104 type Cid = S::Cid;
21052105+ type Resource = S::Resource;
20912106 type CreatedAt = S::CreatedAt;
21072107+ }
21082108+ ///State transition - sets the `inviter` field to Set
21092109+ pub struct SetInviter<S: State = Empty>(PhantomData<fn() -> S>);
21102110+ impl<S: State> sealed::Sealed for SetInviter<S> {}
21112111+ impl<S: State> State for SetInviter<S> {
20922112 type Status = S::Status;
20932113 type Uri = S::Uri;
20942094- type Inviter = S::Inviter;
21142114+ type Inviter = Set<members::inviter>;
21152115+ type Invitee = S::Invitee;
21162116+ type Cid = S::Cid;
21172117+ type Resource = S::Resource;
21182118+ type CreatedAt = S::CreatedAt;
20952119 }
20962120 ///State transition - sets the `invitee` field to Set
20972121 pub struct SetInvitee<S: State = Empty>(PhantomData<fn() -> S>);
20982122 impl<S: State> sealed::Sealed for SetInvitee<S> {}
20992123 impl<S: State> State for SetInvitee<S> {
21002100- type Resource = S::Resource;
21242124+ type Status = S::Status;
21252125+ type Uri = S::Uri;
21262126+ type Inviter = S::Inviter;
21012127 type Invitee = Set<members::invitee>;
21022128 type Cid = S::Cid;
21292129+ type Resource = S::Resource;
21032130 type CreatedAt = S::CreatedAt;
21042104- type Status = S::Status;
21052105- type Uri = S::Uri;
21062106- type Inviter = S::Inviter;
21072131 }
21082132 ///State transition - sets the `cid` field to Set
21092133 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
21102134 impl<S: State> sealed::Sealed for SetCid<S> {}
21112135 impl<S: State> State for SetCid<S> {
21122112- type Resource = S::Resource;
21362136+ type Status = S::Status;
21372137+ type Uri = S::Uri;
21382138+ type Inviter = S::Inviter;
21132139 type Invitee = S::Invitee;
21142140 type Cid = Set<members::cid>;
21412141+ type Resource = S::Resource;
21152142 type CreatedAt = S::CreatedAt;
21432143+ }
21442144+ ///State transition - sets the `resource` field to Set
21452145+ pub struct SetResource<S: State = Empty>(PhantomData<fn() -> S>);
21462146+ impl<S: State> sealed::Sealed for SetResource<S> {}
21472147+ impl<S: State> State for SetResource<S> {
21162148 type Status = S::Status;
21172149 type Uri = S::Uri;
21182150 type Inviter = S::Inviter;
21512151+ type Invitee = S::Invitee;
21522152+ type Cid = S::Cid;
21532153+ type Resource = Set<members::resource>;
21542154+ type CreatedAt = S::CreatedAt;
21192155 }
21202156 ///State transition - sets the `created_at` field to Set
21212157 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
21222158 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
21232159 impl<S: State> State for SetCreatedAt<S> {
21242124- type Resource = S::Resource;
21252125- type Invitee = S::Invitee;
21262126- type Cid = S::Cid;
21272127- type CreatedAt = Set<members::created_at>;
21282160 type Status = S::Status;
21292161 type Uri = S::Uri;
21302162 type Inviter = S::Inviter;
21312131- }
21322132- ///State transition - sets the `status` field to Set
21332133- pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
21342134- impl<S: State> sealed::Sealed for SetStatus<S> {}
21352135- impl<S: State> State for SetStatus<S> {
21362136- type Resource = S::Resource;
21372163 type Invitee = S::Invitee;
21382164 type Cid = S::Cid;
21392139- type CreatedAt = S::CreatedAt;
21402140- type Status = Set<members::status>;
21412141- type Uri = S::Uri;
21422142- type Inviter = S::Inviter;
21432143- }
21442144- ///State transition - sets the `uri` field to Set
21452145- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
21462146- impl<S: State> sealed::Sealed for SetUri<S> {}
21472147- impl<S: State> State for SetUri<S> {
21482165 type Resource = S::Resource;
21492149- type Invitee = S::Invitee;
21502150- type Cid = S::Cid;
21512151- type CreatedAt = S::CreatedAt;
21522152- type Status = S::Status;
21532153- type Uri = Set<members::uri>;
21542154- type Inviter = S::Inviter;
21552155- }
21562156- ///State transition - sets the `inviter` field to Set
21572157- pub struct SetInviter<S: State = Empty>(PhantomData<fn() -> S>);
21582158- impl<S: State> sealed::Sealed for SetInviter<S> {}
21592159- impl<S: State> State for SetInviter<S> {
21602160- type Resource = S::Resource;
21612161- type Invitee = S::Invitee;
21622162- type Cid = S::Cid;
21632163- type CreatedAt = S::CreatedAt;
21642164- type Status = S::Status;
21652165- type Uri = S::Uri;
21662166- type Inviter = Set<members::inviter>;
21662166+ type CreatedAt = Set<members::created_at>;
21672167 }
21682168 /// Marker types for field names
21692169 #[allow(non_camel_case_types)]
21702170 pub mod members {
21712171- ///Marker type for the `resource` field
21722172- pub struct resource(());
21732173- ///Marker type for the `invitee` field
21742174- pub struct invitee(());
21752175- ///Marker type for the `cid` field
21762176- pub struct cid(());
21772177- ///Marker type for the `created_at` field
21782178- pub struct created_at(());
21792171 ///Marker type for the `status` field
21802172 pub struct status(());
21812173 ///Marker type for the `uri` field
21822174 pub struct uri(());
21832175 ///Marker type for the `inviter` field
21842176 pub struct inviter(());
21772177+ ///Marker type for the `invitee` field
21782178+ pub struct invitee(());
21792179+ ///Marker type for the `cid` field
21802180+ pub struct cid(());
21812181+ ///Marker type for the `resource` field
21822182+ pub struct resource(());
21832183+ ///Marker type for the `created_at` field
21842184+ pub struct created_at(());
21852185 }
21862186}
21872187···24792479impl<'a, S> InviteViewBuilder<'a, S>
24802480where
24812481 S: invite_view_state::State,
24822482- S::Resource: invite_view_state::IsSet,
24822482+ S::Status: invite_view_state::IsSet,
24832483+ S::Uri: invite_view_state::IsSet,
24842484+ S::Inviter: invite_view_state::IsSet,
24832485 S::Invitee: invite_view_state::IsSet,
24842486 S::Cid: invite_view_state::IsSet,
24872487+ S::Resource: invite_view_state::IsSet,
24852488 S::CreatedAt: invite_view_state::IsSet,
24862486- S::Status: invite_view_state::IsSet,
24872487- S::Uri: invite_view_state::IsSet,
24882488- S::Inviter: invite_view_state::IsSet,
24892489{
24902490 /// Build the final struct
24912491 pub fn build(self) -> InviteView<'a> {
···28212821 }
28222822 /// State trait tracking which required fields have been set
28232823 pub trait State: sealed::Sealed {
28242824+ type User;
28242825 type Role;
28252826 type Status;
28262826- type User;
28272827 }
28282828 /// Empty state - all required fields are unset
28292829 pub struct Empty(());
28302830 impl sealed::Sealed for Empty {}
28312831 impl State for Empty {
28322832+ type User = Unset;
28322833 type Role = Unset;
28332834 type Status = Unset;
28342834- type User = Unset;
28352835+ }
28362836+ ///State transition - sets the `user` field to Set
28372837+ pub struct SetUser<S: State = Empty>(PhantomData<fn() -> S>);
28382838+ impl<S: State> sealed::Sealed for SetUser<S> {}
28392839+ impl<S: State> State for SetUser<S> {
28402840+ type User = Set<members::user>;
28412841+ type Role = S::Role;
28422842+ type Status = S::Status;
28352843 }
28362844 ///State transition - sets the `role` field to Set
28372845 pub struct SetRole<S: State = Empty>(PhantomData<fn() -> S>);
28382846 impl<S: State> sealed::Sealed for SetRole<S> {}
28392847 impl<S: State> State for SetRole<S> {
28482848+ type User = S::User;
28402849 type Role = Set<members::role>;
28412850 type Status = S::Status;
28422842- type User = S::User;
28432851 }
28442852 ///State transition - sets the `status` field to Set
28452853 pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
28462854 impl<S: State> sealed::Sealed for SetStatus<S> {}
28472855 impl<S: State> State for SetStatus<S> {
28482848- type Role = S::Role;
28492849- type Status = Set<members::status>;
28502856 type User = S::User;
28512851- }
28522852- ///State transition - sets the `user` field to Set
28532853- pub struct SetUser<S: State = Empty>(PhantomData<fn() -> S>);
28542854- impl<S: State> sealed::Sealed for SetUser<S> {}
28552855- impl<S: State> State for SetUser<S> {
28562857 type Role = S::Role;
28572857- type Status = S::Status;
28582858- type User = Set<members::user>;
28582858+ type Status = Set<members::status>;
28592859 }
28602860 /// Marker types for field names
28612861 #[allow(non_camel_case_types)]
28622862 pub mod members {
28632863+ ///Marker type for the `user` field
28642864+ pub struct user(());
28632865 ///Marker type for the `role` field
28642866 pub struct role(());
28652867 ///Marker type for the `status` field
28662868 pub struct status(());
28672867- ///Marker type for the `user` field
28682868- pub struct user(());
28692869 }
28702870}
28712871···31273127impl<'a, S> ParticipantStateViewBuilder<'a, S>
31283128where
31293129 S: participant_state_view_state::State,
31303130+ S::User: participant_state_view_state::IsSet,
31303131 S::Role: participant_state_view_state::IsSet,
31313132 S::Status: participant_state_view_state::IsSet,
31323132- S::User: participant_state_view_state::IsSet,
31333133{
31343134 /// Build the final struct
31353135 pub fn build(self) -> ParticipantStateView<'a> {
···35443544 /// State trait tracking which required fields have been set
35453545 pub trait State: sealed::Sealed {
35463546 type Resource;
35473547- type Uri;
35483547 type CreatedAt;
35493548 type NodeId;
35493549+ type Uri;
35503550 type User;
35513551 }
35523552 /// Empty state - all required fields are unset
···35543554 impl sealed::Sealed for Empty {}
35553555 impl State for Empty {
35563556 type Resource = Unset;
35573557- type Uri = Unset;
35583557 type CreatedAt = Unset;
35593558 type NodeId = Unset;
35593559+ type Uri = Unset;
35603560 type User = Unset;
35613561 }
35623562 ///State transition - sets the `resource` field to Set
···35643564 impl<S: State> sealed::Sealed for SetResource<S> {}
35653565 impl<S: State> State for SetResource<S> {
35663566 type Resource = Set<members::resource>;
35673567- type Uri = S::Uri;
35683567 type CreatedAt = S::CreatedAt;
35693568 type NodeId = S::NodeId;
35703570- type User = S::User;
35713571- }
35723572- ///State transition - sets the `uri` field to Set
35733573- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
35743574- impl<S: State> sealed::Sealed for SetUri<S> {}
35753575- impl<S: State> State for SetUri<S> {
35763576- type Resource = S::Resource;
35773577- type Uri = Set<members::uri>;
35783578- type CreatedAt = S::CreatedAt;
35793579- type NodeId = S::NodeId;
35693569+ type Uri = S::Uri;
35803570 type User = S::User;
35813571 }
35823572 ///State transition - sets the `created_at` field to Set
···35843574 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
35853575 impl<S: State> State for SetCreatedAt<S> {
35863576 type Resource = S::Resource;
35873587- type Uri = S::Uri;
35883577 type CreatedAt = Set<members::created_at>;
35893578 type NodeId = S::NodeId;
35793579+ type Uri = S::Uri;
35903580 type User = S::User;
35913581 }
35923582 ///State transition - sets the `node_id` field to Set
···35943584 impl<S: State> sealed::Sealed for SetNodeId<S> {}
35953585 impl<S: State> State for SetNodeId<S> {
35963586 type Resource = S::Resource;
35873587+ type CreatedAt = S::CreatedAt;
35883588+ type NodeId = Set<members::node_id>;
35973589 type Uri = S::Uri;
35903590+ type User = S::User;
35913591+ }
35923592+ ///State transition - sets the `uri` field to Set
35933593+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
35943594+ impl<S: State> sealed::Sealed for SetUri<S> {}
35953595+ impl<S: State> State for SetUri<S> {
35963596+ type Resource = S::Resource;
35983597 type CreatedAt = S::CreatedAt;
35993599- type NodeId = Set<members::node_id>;
35983598+ type NodeId = S::NodeId;
35993599+ type Uri = Set<members::uri>;
36003600 type User = S::User;
36013601 }
36023602 ///State transition - sets the `user` field to Set
···36043604 impl<S: State> sealed::Sealed for SetUser<S> {}
36053605 impl<S: State> State for SetUser<S> {
36063606 type Resource = S::Resource;
36073607- type Uri = S::Uri;
36083607 type CreatedAt = S::CreatedAt;
36093608 type NodeId = S::NodeId;
36093609+ type Uri = S::Uri;
36103610 type User = Set<members::user>;
36113611 }
36123612 /// Marker types for field names
···36143614 pub mod members {
36153615 ///Marker type for the `resource` field
36163616 pub struct resource(());
36173617- ///Marker type for the `uri` field
36183618- pub struct uri(());
36193617 ///Marker type for the `created_at` field
36203618 pub struct created_at(());
36213619 ///Marker type for the `node_id` field
36223620 pub struct node_id(());
36213621+ ///Marker type for the `uri` field
36223622+ pub struct uri(());
36233623 ///Marker type for the `user` field
36243624 pub struct user(());
36253625 }
···37953795where
37963796 S: session_view_state::State,
37973797 S::Resource: session_view_state::IsSet,
37983798- S::Uri: session_view_state::IsSet,
37993798 S::CreatedAt: session_view_state::IsSet,
38003799 S::NodeId: session_view_state::IsSet,
38003800+ S::Uri: session_view_state::IsSet,
38013801 S::User: session_view_state::IsSet,
38023802{
38033803 /// Build the final struct
+15-15
crates/weaver-api/src/sh_weaver/collab/invite.rs
···140140 }
141141 /// State trait tracking which required fields have been set
142142 pub trait State: sealed::Sealed {
143143+ type Resource;
143144 type Invitee;
144145 type CreatedAt;
145145- type Resource;
146146 }
147147 /// Empty state - all required fields are unset
148148 pub struct Empty(());
149149 impl sealed::Sealed for Empty {}
150150 impl State for Empty {
151151+ type Resource = Unset;
151152 type Invitee = Unset;
152153 type CreatedAt = Unset;
153153- type Resource = Unset;
154154+ }
155155+ ///State transition - sets the `resource` field to Set
156156+ pub struct SetResource<S: State = Empty>(PhantomData<fn() -> S>);
157157+ impl<S: State> sealed::Sealed for SetResource<S> {}
158158+ impl<S: State> State for SetResource<S> {
159159+ type Resource = Set<members::resource>;
160160+ type Invitee = S::Invitee;
161161+ type CreatedAt = S::CreatedAt;
154162 }
155163 ///State transition - sets the `invitee` field to Set
156164 pub struct SetInvitee<S: State = Empty>(PhantomData<fn() -> S>);
157165 impl<S: State> sealed::Sealed for SetInvitee<S> {}
158166 impl<S: State> State for SetInvitee<S> {
167167+ type Resource = S::Resource;
159168 type Invitee = Set<members::invitee>;
160169 type CreatedAt = S::CreatedAt;
161161- type Resource = S::Resource;
162170 }
163171 ///State transition - sets the `created_at` field to Set
164172 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
165173 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
166174 impl<S: State> State for SetCreatedAt<S> {
167167- type Invitee = S::Invitee;
168168- type CreatedAt = Set<members::created_at>;
169175 type Resource = S::Resource;
170170- }
171171- ///State transition - sets the `resource` field to Set
172172- pub struct SetResource<S: State = Empty>(PhantomData<fn() -> S>);
173173- impl<S: State> sealed::Sealed for SetResource<S> {}
174174- impl<S: State> State for SetResource<S> {
175176 type Invitee = S::Invitee;
176176- type CreatedAt = S::CreatedAt;
177177- type Resource = Set<members::resource>;
177177+ type CreatedAt = Set<members::created_at>;
178178 }
179179 /// Marker types for field names
180180 #[allow(non_camel_case_types)]
181181 pub mod members {
182182+ ///Marker type for the `resource` field
183183+ pub struct resource(());
182184 ///Marker type for the `invitee` field
183185 pub struct invitee(());
184186 ///Marker type for the `created_at` field
185187 pub struct created_at(());
186186- ///Marker type for the `resource` field
187187- pub struct resource(());
188188 }
189189}
190190···334334impl<'a, S> InviteBuilder<'a, S>
335335where
336336 S: invite_state::State,
337337+ S::Resource: invite_state::IsSet,
337338 S::Invitee: invite_state::IsSet,
338339 S::CreatedAt: invite_state::IsSet,
339339- S::Resource: invite_state::IsSet,
340340{
341341 /// Build the final struct
342342 pub fn build(self) -> Invite<'a> {
+15-15
crates/weaver-api/src/sh_weaver/collab/session.rs
···4444 }
4545 /// State trait tracking which required fields have been set
4646 pub trait State: sealed::Sealed {
4747- type CreatedAt;
4847 type NodeId;
4848+ type CreatedAt;
4949 type Resource;
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 CreatedAt = Unset;
5655 type NodeId = Unset;
5656+ type CreatedAt = Unset;
5757 type Resource = Unset;
5858 }
5959- ///State transition - sets the `created_at` field to Set
6060- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
6161- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
6262- impl<S: State> State for SetCreatedAt<S> {
6363- type CreatedAt = Set<members::created_at>;
6464- type NodeId = S::NodeId;
6565- type Resource = S::Resource;
6666- }
6759 ///State transition - sets the `node_id` field to Set
6860 pub struct SetNodeId<S: State = Empty>(PhantomData<fn() -> S>);
6961 impl<S: State> sealed::Sealed for SetNodeId<S> {}
7062 impl<S: State> State for SetNodeId<S> {
7171- type CreatedAt = S::CreatedAt;
7263 type NodeId = Set<members::node_id>;
6464+ type CreatedAt = S::CreatedAt;
6565+ type Resource = S::Resource;
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> {
7171+ type NodeId = S::NodeId;
7272+ type CreatedAt = Set<members::created_at>;
7373 type Resource = S::Resource;
7474 }
7575 ///State transition - sets the `resource` field to Set
7676 pub struct SetResource<S: State = Empty>(PhantomData<fn() -> S>);
7777 impl<S: State> sealed::Sealed for SetResource<S> {}
7878 impl<S: State> State for SetResource<S> {
7979- type CreatedAt = S::CreatedAt;
8079 type NodeId = S::NodeId;
8080+ type CreatedAt = S::CreatedAt;
8181 type Resource = Set<members::resource>;
8282 }
8383 /// Marker types for field names
8484 #[allow(non_camel_case_types)]
8585 pub mod members {
8686+ ///Marker type for the `node_id` field
8787+ pub struct node_id(());
8688 ///Marker type for the `created_at` field
8789 pub struct created_at(());
8888- ///Marker type for the `node_id` field
8989- pub struct node_id(());
9090 ///Marker type for the `resource` field
9191 pub struct resource(());
9292 }
···221221impl<'a, S> SessionBuilder<'a, S>
222222where
223223 S: session_state::State,
224224- S::CreatedAt: session_state::IsSet,
225224 S::NodeId: session_state::IsSet,
225225+ S::CreatedAt: session_state::IsSet,
226226 S::Resource: session_state::IsSet,
227227{
228228 /// Build the final struct
+1339
crates/weaver-api/src/sh_weaver/domain.rs
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// Lexicon: sh.weaver.domain.defs
44+//
55+// This file was automatically generated from Lexicon schemas.
66+// Any manual changes will be overwritten on the next regeneration.
77+88+pub mod generate_document;
99+pub mod resolve_by_domain;
1010+pub mod resolve_document;
1111+1212+/// Hydrated view of a document with re-hydrated content.
1313+#[jacquard_derive::lexicon]
1414+#[derive(
1515+ serde::Serialize,
1616+ serde::Deserialize,
1717+ Debug,
1818+ Clone,
1919+ PartialEq,
2020+ Eq,
2121+ jacquard_derive::IntoStatic
2222+)]
2323+#[serde(rename_all = "camelCase")]
2424+pub struct DocumentView<'a> {
2525+ #[serde(borrow)]
2626+ pub cid: jacquard_common::types::string::Cid<'a>,
2727+ #[serde(borrow)]
2828+ pub did: jacquard_common::types::string::Did<'a>,
2929+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
3030+ pub entry_index: std::option::Option<i64>,
3131+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
3232+ #[serde(borrow)]
3333+ pub entry_uri: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
3434+ pub indexed_at: jacquard_common::types::string::Datetime,
3535+ #[serde(borrow)]
3636+ pub path: jacquard_common::CowStr<'a>,
3737+ #[serde(borrow)]
3838+ pub record: jacquard_common::types::value::Data<'a>,
3939+ #[serde(borrow)]
4040+ pub rkey: jacquard_common::CowStr<'a>,
4141+ #[serde(borrow)]
4242+ pub title: jacquard_common::CowStr<'a>,
4343+ #[serde(borrow)]
4444+ pub uri: jacquard_common::types::string::AtUri<'a>,
4545+}
4646+4747+pub mod document_view_state {
4848+4949+ pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
5050+ #[allow(unused)]
5151+ use ::core::marker::PhantomData;
5252+ mod sealed {
5353+ pub trait Sealed {}
5454+ }
5555+ /// State trait tracking which required fields have been set
5656+ pub trait State: sealed::Sealed {
5757+ type Rkey;
5858+ type IndexedAt;
5959+ type Record;
6060+ type Path;
6161+ type Uri;
6262+ type Cid;
6363+ type Title;
6464+ type Did;
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 Rkey = Unset;
7171+ type IndexedAt = Unset;
7272+ type Record = Unset;
7373+ type Path = Unset;
7474+ type Uri = Unset;
7575+ type Cid = Unset;
7676+ type Title = Unset;
7777+ type Did = Unset;
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 Rkey = Set<members::rkey>;
8484+ type IndexedAt = S::IndexedAt;
8585+ type Record = S::Record;
8686+ type Path = S::Path;
8787+ type Uri = S::Uri;
8888+ type Cid = S::Cid;
8989+ type Title = S::Title;
9090+ type Did = S::Did;
9191+ }
9292+ ///State transition - sets the `indexed_at` field to Set
9393+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
9494+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
9595+ impl<S: State> State for SetIndexedAt<S> {
9696+ type Rkey = S::Rkey;
9797+ type IndexedAt = Set<members::indexed_at>;
9898+ type Record = S::Record;
9999+ type Path = S::Path;
100100+ type Uri = S::Uri;
101101+ type Cid = S::Cid;
102102+ type Title = S::Title;
103103+ type Did = S::Did;
104104+ }
105105+ ///State transition - sets the `record` field to Set
106106+ pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
107107+ impl<S: State> sealed::Sealed for SetRecord<S> {}
108108+ impl<S: State> State for SetRecord<S> {
109109+ type Rkey = S::Rkey;
110110+ type IndexedAt = S::IndexedAt;
111111+ type Record = Set<members::record>;
112112+ type Path = S::Path;
113113+ type Uri = S::Uri;
114114+ type Cid = S::Cid;
115115+ type Title = S::Title;
116116+ type Did = S::Did;
117117+ }
118118+ ///State transition - sets the `path` field to Set
119119+ pub struct SetPath<S: State = Empty>(PhantomData<fn() -> S>);
120120+ impl<S: State> sealed::Sealed for SetPath<S> {}
121121+ impl<S: State> State for SetPath<S> {
122122+ type Rkey = S::Rkey;
123123+ type IndexedAt = S::IndexedAt;
124124+ type Record = S::Record;
125125+ type Path = Set<members::path>;
126126+ type Uri = S::Uri;
127127+ type Cid = S::Cid;
128128+ type Title = S::Title;
129129+ type Did = S::Did;
130130+ }
131131+ ///State transition - sets the `uri` field to Set
132132+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
133133+ impl<S: State> sealed::Sealed for SetUri<S> {}
134134+ impl<S: State> State for SetUri<S> {
135135+ type Rkey = S::Rkey;
136136+ type IndexedAt = S::IndexedAt;
137137+ type Record = S::Record;
138138+ type Path = S::Path;
139139+ type Uri = Set<members::uri>;
140140+ type Cid = S::Cid;
141141+ type Title = S::Title;
142142+ type Did = S::Did;
143143+ }
144144+ ///State transition - sets the `cid` field to Set
145145+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
146146+ impl<S: State> sealed::Sealed for SetCid<S> {}
147147+ impl<S: State> State for SetCid<S> {
148148+ type Rkey = S::Rkey;
149149+ type IndexedAt = S::IndexedAt;
150150+ type Record = S::Record;
151151+ type Path = S::Path;
152152+ type Uri = S::Uri;
153153+ type Cid = Set<members::cid>;
154154+ type Title = S::Title;
155155+ type Did = S::Did;
156156+ }
157157+ ///State transition - sets the `title` field to Set
158158+ pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
159159+ impl<S: State> sealed::Sealed for SetTitle<S> {}
160160+ impl<S: State> State for SetTitle<S> {
161161+ type Rkey = S::Rkey;
162162+ type IndexedAt = S::IndexedAt;
163163+ type Record = S::Record;
164164+ type Path = S::Path;
165165+ type Uri = S::Uri;
166166+ type Cid = S::Cid;
167167+ type Title = Set<members::title>;
168168+ type Did = S::Did;
169169+ }
170170+ ///State transition - sets the `did` field to Set
171171+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
172172+ impl<S: State> sealed::Sealed for SetDid<S> {}
173173+ impl<S: State> State for SetDid<S> {
174174+ type Rkey = S::Rkey;
175175+ type IndexedAt = S::IndexedAt;
176176+ type Record = S::Record;
177177+ type Path = S::Path;
178178+ type Uri = S::Uri;
179179+ type Cid = S::Cid;
180180+ type Title = S::Title;
181181+ type Did = Set<members::did>;
182182+ }
183183+ /// Marker types for field names
184184+ #[allow(non_camel_case_types)]
185185+ pub mod members {
186186+ ///Marker type for the `rkey` field
187187+ pub struct rkey(());
188188+ ///Marker type for the `indexed_at` field
189189+ pub struct indexed_at(());
190190+ ///Marker type for the `record` field
191191+ pub struct record(());
192192+ ///Marker type for the `path` field
193193+ pub struct path(());
194194+ ///Marker type for the `uri` field
195195+ pub struct uri(());
196196+ ///Marker type for the `cid` field
197197+ pub struct cid(());
198198+ ///Marker type for the `title` field
199199+ pub struct title(());
200200+ ///Marker type for the `did` field
201201+ pub struct did(());
202202+ }
203203+}
204204+205205+/// Builder for constructing an instance of this type
206206+pub struct DocumentViewBuilder<'a, S: document_view_state::State> {
207207+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
208208+ __unsafe_private_named: (
209209+ ::core::option::Option<jacquard_common::types::string::Cid<'a>>,
210210+ ::core::option::Option<jacquard_common::types::string::Did<'a>>,
211211+ ::core::option::Option<i64>,
212212+ ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
213213+ ::core::option::Option<jacquard_common::types::string::Datetime>,
214214+ ::core::option::Option<jacquard_common::CowStr<'a>>,
215215+ ::core::option::Option<jacquard_common::types::value::Data<'a>>,
216216+ ::core::option::Option<jacquard_common::CowStr<'a>>,
217217+ ::core::option::Option<jacquard_common::CowStr<'a>>,
218218+ ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
219219+ ),
220220+ _phantom: ::core::marker::PhantomData<&'a ()>,
221221+}
222222+223223+impl<'a> DocumentView<'a> {
224224+ /// Create a new builder for this type
225225+ pub fn new() -> DocumentViewBuilder<'a, document_view_state::Empty> {
226226+ DocumentViewBuilder::new()
227227+ }
228228+}
229229+230230+impl<'a> DocumentViewBuilder<'a, document_view_state::Empty> {
231231+ /// Create a new builder with all fields unset
232232+ pub fn new() -> Self {
233233+ DocumentViewBuilder {
234234+ _phantom_state: ::core::marker::PhantomData,
235235+ __unsafe_private_named: (
236236+ None,
237237+ None,
238238+ None,
239239+ None,
240240+ None,
241241+ None,
242242+ None,
243243+ None,
244244+ None,
245245+ None,
246246+ ),
247247+ _phantom: ::core::marker::PhantomData,
248248+ }
249249+ }
250250+}
251251+252252+impl<'a, S> DocumentViewBuilder<'a, S>
253253+where
254254+ S: document_view_state::State,
255255+ S::Cid: document_view_state::IsUnset,
256256+{
257257+ /// Set the `cid` field (required)
258258+ pub fn cid(
259259+ mut self,
260260+ value: impl Into<jacquard_common::types::string::Cid<'a>>,
261261+ ) -> DocumentViewBuilder<'a, document_view_state::SetCid<S>> {
262262+ self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
263263+ DocumentViewBuilder {
264264+ _phantom_state: ::core::marker::PhantomData,
265265+ __unsafe_private_named: self.__unsafe_private_named,
266266+ _phantom: ::core::marker::PhantomData,
267267+ }
268268+ }
269269+}
270270+271271+impl<'a, S> DocumentViewBuilder<'a, S>
272272+where
273273+ S: document_view_state::State,
274274+ S::Did: document_view_state::IsUnset,
275275+{
276276+ /// Set the `did` field (required)
277277+ pub fn did(
278278+ mut self,
279279+ value: impl Into<jacquard_common::types::string::Did<'a>>,
280280+ ) -> DocumentViewBuilder<'a, document_view_state::SetDid<S>> {
281281+ self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
282282+ DocumentViewBuilder {
283283+ _phantom_state: ::core::marker::PhantomData,
284284+ __unsafe_private_named: self.__unsafe_private_named,
285285+ _phantom: ::core::marker::PhantomData,
286286+ }
287287+ }
288288+}
289289+290290+impl<'a, S: document_view_state::State> DocumentViewBuilder<'a, S> {
291291+ /// Set the `entryIndex` field (optional)
292292+ pub fn entry_index(mut self, value: impl Into<Option<i64>>) -> Self {
293293+ self.__unsafe_private_named.2 = value.into();
294294+ self
295295+ }
296296+ /// Set the `entryIndex` field to an Option value (optional)
297297+ pub fn maybe_entry_index(mut self, value: Option<i64>) -> Self {
298298+ self.__unsafe_private_named.2 = value;
299299+ self
300300+ }
301301+}
302302+303303+impl<'a, S: document_view_state::State> DocumentViewBuilder<'a, S> {
304304+ /// Set the `entryUri` field (optional)
305305+ pub fn entry_uri(
306306+ mut self,
307307+ value: impl Into<Option<jacquard_common::types::string::AtUri<'a>>>,
308308+ ) -> Self {
309309+ self.__unsafe_private_named.3 = value.into();
310310+ self
311311+ }
312312+ /// Set the `entryUri` field to an Option value (optional)
313313+ pub fn maybe_entry_uri(
314314+ mut self,
315315+ value: Option<jacquard_common::types::string::AtUri<'a>>,
316316+ ) -> Self {
317317+ self.__unsafe_private_named.3 = value;
318318+ self
319319+ }
320320+}
321321+322322+impl<'a, S> DocumentViewBuilder<'a, S>
323323+where
324324+ S: document_view_state::State,
325325+ S::IndexedAt: document_view_state::IsUnset,
326326+{
327327+ /// Set the `indexedAt` field (required)
328328+ pub fn indexed_at(
329329+ mut self,
330330+ value: impl Into<jacquard_common::types::string::Datetime>,
331331+ ) -> DocumentViewBuilder<'a, document_view_state::SetIndexedAt<S>> {
332332+ self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into());
333333+ DocumentViewBuilder {
334334+ _phantom_state: ::core::marker::PhantomData,
335335+ __unsafe_private_named: self.__unsafe_private_named,
336336+ _phantom: ::core::marker::PhantomData,
337337+ }
338338+ }
339339+}
340340+341341+impl<'a, S> DocumentViewBuilder<'a, S>
342342+where
343343+ S: document_view_state::State,
344344+ S::Path: document_view_state::IsUnset,
345345+{
346346+ /// Set the `path` field (required)
347347+ pub fn path(
348348+ mut self,
349349+ value: impl Into<jacquard_common::CowStr<'a>>,
350350+ ) -> DocumentViewBuilder<'a, document_view_state::SetPath<S>> {
351351+ self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into());
352352+ DocumentViewBuilder {
353353+ _phantom_state: ::core::marker::PhantomData,
354354+ __unsafe_private_named: self.__unsafe_private_named,
355355+ _phantom: ::core::marker::PhantomData,
356356+ }
357357+ }
358358+}
359359+360360+impl<'a, S> DocumentViewBuilder<'a, S>
361361+where
362362+ S: document_view_state::State,
363363+ S::Record: document_view_state::IsUnset,
364364+{
365365+ /// Set the `record` field (required)
366366+ pub fn record(
367367+ mut self,
368368+ value: impl Into<jacquard_common::types::value::Data<'a>>,
369369+ ) -> DocumentViewBuilder<'a, document_view_state::SetRecord<S>> {
370370+ self.__unsafe_private_named.6 = ::core::option::Option::Some(value.into());
371371+ DocumentViewBuilder {
372372+ _phantom_state: ::core::marker::PhantomData,
373373+ __unsafe_private_named: self.__unsafe_private_named,
374374+ _phantom: ::core::marker::PhantomData,
375375+ }
376376+ }
377377+}
378378+379379+impl<'a, S> DocumentViewBuilder<'a, S>
380380+where
381381+ S: document_view_state::State,
382382+ S::Rkey: document_view_state::IsUnset,
383383+{
384384+ /// Set the `rkey` field (required)
385385+ pub fn rkey(
386386+ mut self,
387387+ value: impl Into<jacquard_common::CowStr<'a>>,
388388+ ) -> DocumentViewBuilder<'a, document_view_state::SetRkey<S>> {
389389+ self.__unsafe_private_named.7 = ::core::option::Option::Some(value.into());
390390+ DocumentViewBuilder {
391391+ _phantom_state: ::core::marker::PhantomData,
392392+ __unsafe_private_named: self.__unsafe_private_named,
393393+ _phantom: ::core::marker::PhantomData,
394394+ }
395395+ }
396396+}
397397+398398+impl<'a, S> DocumentViewBuilder<'a, S>
399399+where
400400+ S: document_view_state::State,
401401+ S::Title: document_view_state::IsUnset,
402402+{
403403+ /// Set the `title` field (required)
404404+ pub fn title(
405405+ mut self,
406406+ value: impl Into<jacquard_common::CowStr<'a>>,
407407+ ) -> DocumentViewBuilder<'a, document_view_state::SetTitle<S>> {
408408+ self.__unsafe_private_named.8 = ::core::option::Option::Some(value.into());
409409+ DocumentViewBuilder {
410410+ _phantom_state: ::core::marker::PhantomData,
411411+ __unsafe_private_named: self.__unsafe_private_named,
412412+ _phantom: ::core::marker::PhantomData,
413413+ }
414414+ }
415415+}
416416+417417+impl<'a, S> DocumentViewBuilder<'a, S>
418418+where
419419+ S: document_view_state::State,
420420+ S::Uri: document_view_state::IsUnset,
421421+{
422422+ /// Set the `uri` field (required)
423423+ pub fn uri(
424424+ mut self,
425425+ value: impl Into<jacquard_common::types::string::AtUri<'a>>,
426426+ ) -> DocumentViewBuilder<'a, document_view_state::SetUri<S>> {
427427+ self.__unsafe_private_named.9 = ::core::option::Option::Some(value.into());
428428+ DocumentViewBuilder {
429429+ _phantom_state: ::core::marker::PhantomData,
430430+ __unsafe_private_named: self.__unsafe_private_named,
431431+ _phantom: ::core::marker::PhantomData,
432432+ }
433433+ }
434434+}
435435+436436+impl<'a, S> DocumentViewBuilder<'a, S>
437437+where
438438+ S: document_view_state::State,
439439+ S::Rkey: document_view_state::IsSet,
440440+ S::IndexedAt: document_view_state::IsSet,
441441+ S::Record: document_view_state::IsSet,
442442+ S::Path: document_view_state::IsSet,
443443+ S::Uri: document_view_state::IsSet,
444444+ S::Cid: document_view_state::IsSet,
445445+ S::Title: document_view_state::IsSet,
446446+ S::Did: document_view_state::IsSet,
447447+{
448448+ /// Build the final struct
449449+ pub fn build(self) -> DocumentView<'a> {
450450+ DocumentView {
451451+ cid: self.__unsafe_private_named.0.unwrap(),
452452+ did: self.__unsafe_private_named.1.unwrap(),
453453+ entry_index: self.__unsafe_private_named.2,
454454+ entry_uri: self.__unsafe_private_named.3,
455455+ indexed_at: self.__unsafe_private_named.4.unwrap(),
456456+ path: self.__unsafe_private_named.5.unwrap(),
457457+ record: self.__unsafe_private_named.6.unwrap(),
458458+ rkey: self.__unsafe_private_named.7.unwrap(),
459459+ title: self.__unsafe_private_named.8.unwrap(),
460460+ uri: self.__unsafe_private_named.9.unwrap(),
461461+ extra_data: Default::default(),
462462+ }
463463+ }
464464+ /// Build the final struct with custom extra_data
465465+ pub fn build_with_data(
466466+ self,
467467+ extra_data: std::collections::BTreeMap<
468468+ jacquard_common::smol_str::SmolStr,
469469+ jacquard_common::types::value::Data<'a>,
470470+ >,
471471+ ) -> DocumentView<'a> {
472472+ DocumentView {
473473+ cid: self.__unsafe_private_named.0.unwrap(),
474474+ did: self.__unsafe_private_named.1.unwrap(),
475475+ entry_index: self.__unsafe_private_named.2,
476476+ entry_uri: self.__unsafe_private_named.3,
477477+ indexed_at: self.__unsafe_private_named.4.unwrap(),
478478+ path: self.__unsafe_private_named.5.unwrap(),
479479+ record: self.__unsafe_private_named.6.unwrap(),
480480+ rkey: self.__unsafe_private_named.7.unwrap(),
481481+ title: self.__unsafe_private_named.8.unwrap(),
482482+ uri: self.__unsafe_private_named.9.unwrap(),
483483+ extra_data: Some(extra_data),
484484+ }
485485+ }
486486+}
487487+488488+fn lexicon_doc_sh_weaver_domain_defs() -> ::jacquard_lexicon::lexicon::LexiconDoc<
489489+ 'static,
490490+> {
491491+ ::jacquard_lexicon::lexicon::LexiconDoc {
492492+ lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
493493+ id: ::jacquard_common::CowStr::new_static("sh.weaver.domain.defs"),
494494+ revision: None,
495495+ description: None,
496496+ defs: {
497497+ let mut map = ::alloc::collections::BTreeMap::new();
498498+ map.insert(
499499+ ::jacquard_common::smol_str::SmolStr::new_static("documentView"),
500500+ ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
501501+ description: Some(
502502+ ::jacquard_common::CowStr::new_static(
503503+ "Hydrated view of a document with re-hydrated content.",
504504+ ),
505505+ ),
506506+ required: Some(
507507+ vec![
508508+ ::jacquard_common::smol_str::SmolStr::new_static("uri"),
509509+ ::jacquard_common::smol_str::SmolStr::new_static("cid"),
510510+ ::jacquard_common::smol_str::SmolStr::new_static("did"),
511511+ ::jacquard_common::smol_str::SmolStr::new_static("rkey"),
512512+ ::jacquard_common::smol_str::SmolStr::new_static("title"),
513513+ ::jacquard_common::smol_str::SmolStr::new_static("path"),
514514+ ::jacquard_common::smol_str::SmolStr::new_static("record"),
515515+ ::jacquard_common::smol_str::SmolStr::new_static("indexedAt")
516516+ ],
517517+ ),
518518+ nullable: None,
519519+ properties: {
520520+ #[allow(unused_mut)]
521521+ let mut map = ::alloc::collections::BTreeMap::new();
522522+ map.insert(
523523+ ::jacquard_common::smol_str::SmolStr::new_static("cid"),
524524+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
525525+ description: None,
526526+ format: Some(
527527+ ::jacquard_lexicon::lexicon::LexStringFormat::Cid,
528528+ ),
529529+ default: None,
530530+ min_length: None,
531531+ max_length: None,
532532+ min_graphemes: None,
533533+ max_graphemes: None,
534534+ r#enum: None,
535535+ r#const: None,
536536+ known_values: None,
537537+ }),
538538+ );
539539+ map.insert(
540540+ ::jacquard_common::smol_str::SmolStr::new_static("did"),
541541+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
542542+ description: None,
543543+ format: Some(
544544+ ::jacquard_lexicon::lexicon::LexStringFormat::Did,
545545+ ),
546546+ default: None,
547547+ min_length: None,
548548+ max_length: None,
549549+ min_graphemes: None,
550550+ max_graphemes: None,
551551+ r#enum: None,
552552+ r#const: None,
553553+ known_values: None,
554554+ }),
555555+ );
556556+ map.insert(
557557+ ::jacquard_common::smol_str::SmolStr::new_static(
558558+ "entryIndex",
559559+ ),
560560+ ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
561561+ description: None,
562562+ default: None,
563563+ minimum: None,
564564+ maximum: None,
565565+ r#enum: None,
566566+ r#const: None,
567567+ }),
568568+ );
569569+ map.insert(
570570+ ::jacquard_common::smol_str::SmolStr::new_static("entryUri"),
571571+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
572572+ description: None,
573573+ format: Some(
574574+ ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
575575+ ),
576576+ default: None,
577577+ min_length: None,
578578+ max_length: None,
579579+ min_graphemes: None,
580580+ max_graphemes: None,
581581+ r#enum: None,
582582+ r#const: None,
583583+ known_values: None,
584584+ }),
585585+ );
586586+ map.insert(
587587+ ::jacquard_common::smol_str::SmolStr::new_static(
588588+ "indexedAt",
589589+ ),
590590+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
591591+ description: None,
592592+ format: Some(
593593+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
594594+ ),
595595+ default: None,
596596+ min_length: None,
597597+ max_length: None,
598598+ min_graphemes: None,
599599+ max_graphemes: None,
600600+ r#enum: None,
601601+ r#const: None,
602602+ known_values: None,
603603+ }),
604604+ );
605605+ map.insert(
606606+ ::jacquard_common::smol_str::SmolStr::new_static("path"),
607607+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
608608+ description: None,
609609+ format: None,
610610+ default: None,
611611+ min_length: None,
612612+ max_length: None,
613613+ min_graphemes: None,
614614+ max_graphemes: None,
615615+ r#enum: None,
616616+ r#const: None,
617617+ known_values: None,
618618+ }),
619619+ );
620620+ map.insert(
621621+ ::jacquard_common::smol_str::SmolStr::new_static("record"),
622622+ ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown {
623623+ description: None,
624624+ }),
625625+ );
626626+ map.insert(
627627+ ::jacquard_common::smol_str::SmolStr::new_static("rkey"),
628628+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
629629+ description: None,
630630+ format: None,
631631+ default: None,
632632+ min_length: None,
633633+ max_length: None,
634634+ min_graphemes: None,
635635+ max_graphemes: None,
636636+ r#enum: None,
637637+ r#const: None,
638638+ known_values: None,
639639+ }),
640640+ );
641641+ map.insert(
642642+ ::jacquard_common::smol_str::SmolStr::new_static("title"),
643643+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
644644+ description: None,
645645+ format: None,
646646+ default: None,
647647+ min_length: None,
648648+ max_length: None,
649649+ min_graphemes: None,
650650+ max_graphemes: None,
651651+ r#enum: None,
652652+ r#const: None,
653653+ known_values: None,
654654+ }),
655655+ );
656656+ map.insert(
657657+ ::jacquard_common::smol_str::SmolStr::new_static("uri"),
658658+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
659659+ description: None,
660660+ format: Some(
661661+ ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
662662+ ),
663663+ default: None,
664664+ min_length: None,
665665+ max_length: None,
666666+ min_graphemes: None,
667667+ max_graphemes: None,
668668+ r#enum: None,
669669+ r#const: None,
670670+ known_values: None,
671671+ }),
672672+ );
673673+ map
674674+ },
675675+ }),
676676+ );
677677+ map.insert(
678678+ ::jacquard_common::smol_str::SmolStr::new_static("publicationView"),
679679+ ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
680680+ description: Some(
681681+ ::jacquard_common::CowStr::new_static(
682682+ "Hydrated view of a publication with domain info.",
683683+ ),
684684+ ),
685685+ required: Some(
686686+ vec![
687687+ ::jacquard_common::smol_str::SmolStr::new_static("uri"),
688688+ ::jacquard_common::smol_str::SmolStr::new_static("cid"),
689689+ ::jacquard_common::smol_str::SmolStr::new_static("did"),
690690+ ::jacquard_common::smol_str::SmolStr::new_static("rkey"),
691691+ ::jacquard_common::smol_str::SmolStr::new_static("name"),
692692+ ::jacquard_common::smol_str::SmolStr::new_static("domain"),
693693+ ::jacquard_common::smol_str::SmolStr::new_static("record"),
694694+ ::jacquard_common::smol_str::SmolStr::new_static("indexedAt")
695695+ ],
696696+ ),
697697+ nullable: None,
698698+ properties: {
699699+ #[allow(unused_mut)]
700700+ let mut map = ::alloc::collections::BTreeMap::new();
701701+ map.insert(
702702+ ::jacquard_common::smol_str::SmolStr::new_static("cid"),
703703+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
704704+ description: None,
705705+ format: Some(
706706+ ::jacquard_lexicon::lexicon::LexStringFormat::Cid,
707707+ ),
708708+ default: None,
709709+ min_length: None,
710710+ max_length: None,
711711+ min_graphemes: None,
712712+ max_graphemes: None,
713713+ r#enum: None,
714714+ r#const: None,
715715+ known_values: None,
716716+ }),
717717+ );
718718+ map.insert(
719719+ ::jacquard_common::smol_str::SmolStr::new_static("did"),
720720+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
721721+ description: None,
722722+ format: Some(
723723+ ::jacquard_lexicon::lexicon::LexStringFormat::Did,
724724+ ),
725725+ default: None,
726726+ min_length: None,
727727+ max_length: None,
728728+ min_graphemes: None,
729729+ max_graphemes: None,
730730+ r#enum: None,
731731+ r#const: None,
732732+ known_values: None,
733733+ }),
734734+ );
735735+ map.insert(
736736+ ::jacquard_common::smol_str::SmolStr::new_static("domain"),
737737+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
738738+ description: None,
739739+ format: None,
740740+ default: None,
741741+ min_length: None,
742742+ max_length: None,
743743+ min_graphemes: None,
744744+ max_graphemes: None,
745745+ r#enum: None,
746746+ r#const: None,
747747+ known_values: None,
748748+ }),
749749+ );
750750+ map.insert(
751751+ ::jacquard_common::smol_str::SmolStr::new_static(
752752+ "indexedAt",
753753+ ),
754754+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
755755+ description: None,
756756+ format: Some(
757757+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
758758+ ),
759759+ default: None,
760760+ min_length: None,
761761+ max_length: None,
762762+ min_graphemes: None,
763763+ max_graphemes: None,
764764+ r#enum: None,
765765+ r#const: None,
766766+ known_values: None,
767767+ }),
768768+ );
769769+ map.insert(
770770+ ::jacquard_common::smol_str::SmolStr::new_static("name"),
771771+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
772772+ description: None,
773773+ format: None,
774774+ default: None,
775775+ min_length: None,
776776+ max_length: None,
777777+ min_graphemes: None,
778778+ max_graphemes: None,
779779+ r#enum: None,
780780+ r#const: None,
781781+ known_values: None,
782782+ }),
783783+ );
784784+ map.insert(
785785+ ::jacquard_common::smol_str::SmolStr::new_static(
786786+ "notebookUri",
787787+ ),
788788+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
789789+ description: None,
790790+ format: Some(
791791+ ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
792792+ ),
793793+ default: None,
794794+ min_length: None,
795795+ max_length: None,
796796+ min_graphemes: None,
797797+ max_graphemes: None,
798798+ r#enum: None,
799799+ r#const: None,
800800+ known_values: None,
801801+ }),
802802+ );
803803+ map.insert(
804804+ ::jacquard_common::smol_str::SmolStr::new_static("record"),
805805+ ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown {
806806+ description: None,
807807+ }),
808808+ );
809809+ map.insert(
810810+ ::jacquard_common::smol_str::SmolStr::new_static("rkey"),
811811+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
812812+ description: None,
813813+ format: None,
814814+ default: None,
815815+ min_length: None,
816816+ max_length: None,
817817+ min_graphemes: None,
818818+ max_graphemes: None,
819819+ r#enum: None,
820820+ r#const: None,
821821+ known_values: None,
822822+ }),
823823+ );
824824+ map.insert(
825825+ ::jacquard_common::smol_str::SmolStr::new_static("uri"),
826826+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
827827+ description: None,
828828+ format: Some(
829829+ ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
830830+ ),
831831+ default: None,
832832+ min_length: None,
833833+ max_length: None,
834834+ min_graphemes: None,
835835+ max_graphemes: None,
836836+ r#enum: None,
837837+ r#const: None,
838838+ known_values: None,
839839+ }),
840840+ );
841841+ map
842842+ },
843843+ }),
844844+ );
845845+ map
846846+ },
847847+ }
848848+}
849849+850850+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for DocumentView<'a> {
851851+ fn nsid() -> &'static str {
852852+ "sh.weaver.domain.defs"
853853+ }
854854+ fn def_name() -> &'static str {
855855+ "documentView"
856856+ }
857857+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
858858+ lexicon_doc_sh_weaver_domain_defs()
859859+ }
860860+ fn validate(
861861+ &self,
862862+ ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
863863+ Ok(())
864864+ }
865865+}
866866+867867+/// Hydrated view of a publication with domain info.
868868+#[jacquard_derive::lexicon]
869869+#[derive(
870870+ serde::Serialize,
871871+ serde::Deserialize,
872872+ Debug,
873873+ Clone,
874874+ PartialEq,
875875+ Eq,
876876+ jacquard_derive::IntoStatic
877877+)]
878878+#[serde(rename_all = "camelCase")]
879879+pub struct PublicationView<'a> {
880880+ #[serde(borrow)]
881881+ pub cid: jacquard_common::types::string::Cid<'a>,
882882+ #[serde(borrow)]
883883+ pub did: jacquard_common::types::string::Did<'a>,
884884+ #[serde(borrow)]
885885+ pub domain: jacquard_common::CowStr<'a>,
886886+ pub indexed_at: jacquard_common::types::string::Datetime,
887887+ #[serde(borrow)]
888888+ pub name: jacquard_common::CowStr<'a>,
889889+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
890890+ #[serde(borrow)]
891891+ pub notebook_uri: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
892892+ #[serde(borrow)]
893893+ pub record: jacquard_common::types::value::Data<'a>,
894894+ #[serde(borrow)]
895895+ pub rkey: jacquard_common::CowStr<'a>,
896896+ #[serde(borrow)]
897897+ pub uri: jacquard_common::types::string::AtUri<'a>,
898898+}
899899+900900+pub mod publication_view_state {
901901+902902+ pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
903903+ #[allow(unused)]
904904+ use ::core::marker::PhantomData;
905905+ mod sealed {
906906+ pub trait Sealed {}
907907+ }
908908+ /// State trait tracking which required fields have been set
909909+ pub trait State: sealed::Sealed {
910910+ type Uri;
911911+ type Rkey;
912912+ type Did;
913913+ type Cid;
914914+ type Domain;
915915+ type Record;
916916+ type Name;
917917+ type IndexedAt;
918918+ }
919919+ /// Empty state - all required fields are unset
920920+ pub struct Empty(());
921921+ impl sealed::Sealed for Empty {}
922922+ impl State for Empty {
923923+ type Uri = Unset;
924924+ type Rkey = Unset;
925925+ type Did = Unset;
926926+ type Cid = Unset;
927927+ type Domain = Unset;
928928+ type Record = Unset;
929929+ type Name = Unset;
930930+ type IndexedAt = Unset;
931931+ }
932932+ ///State transition - sets the `uri` field to Set
933933+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
934934+ impl<S: State> sealed::Sealed for SetUri<S> {}
935935+ impl<S: State> State for SetUri<S> {
936936+ type Uri = Set<members::uri>;
937937+ type Rkey = S::Rkey;
938938+ type Did = S::Did;
939939+ type Cid = S::Cid;
940940+ type Domain = S::Domain;
941941+ type Record = S::Record;
942942+ type Name = S::Name;
943943+ type IndexedAt = S::IndexedAt;
944944+ }
945945+ ///State transition - sets the `rkey` field to Set
946946+ pub struct SetRkey<S: State = Empty>(PhantomData<fn() -> S>);
947947+ impl<S: State> sealed::Sealed for SetRkey<S> {}
948948+ impl<S: State> State for SetRkey<S> {
949949+ type Uri = S::Uri;
950950+ type Rkey = Set<members::rkey>;
951951+ type Did = S::Did;
952952+ type Cid = S::Cid;
953953+ type Domain = S::Domain;
954954+ type Record = S::Record;
955955+ type Name = S::Name;
956956+ type IndexedAt = S::IndexedAt;
957957+ }
958958+ ///State transition - sets the `did` field to Set
959959+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
960960+ impl<S: State> sealed::Sealed for SetDid<S> {}
961961+ impl<S: State> State for SetDid<S> {
962962+ type Uri = S::Uri;
963963+ type Rkey = S::Rkey;
964964+ type Did = Set<members::did>;
965965+ type Cid = S::Cid;
966966+ type Domain = S::Domain;
967967+ type Record = S::Record;
968968+ type Name = S::Name;
969969+ type IndexedAt = S::IndexedAt;
970970+ }
971971+ ///State transition - sets the `cid` field to Set
972972+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
973973+ impl<S: State> sealed::Sealed for SetCid<S> {}
974974+ impl<S: State> State for SetCid<S> {
975975+ type Uri = S::Uri;
976976+ type Rkey = S::Rkey;
977977+ type Did = S::Did;
978978+ type Cid = Set<members::cid>;
979979+ type Domain = S::Domain;
980980+ type Record = S::Record;
981981+ type Name = S::Name;
982982+ type IndexedAt = S::IndexedAt;
983983+ }
984984+ ///State transition - sets the `domain` field to Set
985985+ pub struct SetDomain<S: State = Empty>(PhantomData<fn() -> S>);
986986+ impl<S: State> sealed::Sealed for SetDomain<S> {}
987987+ impl<S: State> State for SetDomain<S> {
988988+ type Uri = S::Uri;
989989+ type Rkey = S::Rkey;
990990+ type Did = S::Did;
991991+ type Cid = S::Cid;
992992+ type Domain = Set<members::domain>;
993993+ type Record = S::Record;
994994+ type Name = S::Name;
995995+ type IndexedAt = S::IndexedAt;
996996+ }
997997+ ///State transition - sets the `record` field to Set
998998+ pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
999999+ impl<S: State> sealed::Sealed for SetRecord<S> {}
10001000+ impl<S: State> State for SetRecord<S> {
10011001+ type Uri = S::Uri;
10021002+ type Rkey = S::Rkey;
10031003+ type Did = S::Did;
10041004+ type Cid = S::Cid;
10051005+ type Domain = S::Domain;
10061006+ type Record = Set<members::record>;
10071007+ type Name = S::Name;
10081008+ type IndexedAt = S::IndexedAt;
10091009+ }
10101010+ ///State transition - sets the `name` field to Set
10111011+ pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
10121012+ impl<S: State> sealed::Sealed for SetName<S> {}
10131013+ impl<S: State> State for SetName<S> {
10141014+ type Uri = S::Uri;
10151015+ type Rkey = S::Rkey;
10161016+ type Did = S::Did;
10171017+ type Cid = S::Cid;
10181018+ type Domain = S::Domain;
10191019+ type Record = S::Record;
10201020+ type Name = Set<members::name>;
10211021+ type IndexedAt = S::IndexedAt;
10221022+ }
10231023+ ///State transition - sets the `indexed_at` field to Set
10241024+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
10251025+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
10261026+ impl<S: State> State for SetIndexedAt<S> {
10271027+ type Uri = S::Uri;
10281028+ type Rkey = S::Rkey;
10291029+ type Did = S::Did;
10301030+ type Cid = S::Cid;
10311031+ type Domain = S::Domain;
10321032+ type Record = S::Record;
10331033+ type Name = S::Name;
10341034+ type IndexedAt = Set<members::indexed_at>;
10351035+ }
10361036+ /// Marker types for field names
10371037+ #[allow(non_camel_case_types)]
10381038+ pub mod members {
10391039+ ///Marker type for the `uri` field
10401040+ pub struct uri(());
10411041+ ///Marker type for the `rkey` field
10421042+ pub struct rkey(());
10431043+ ///Marker type for the `did` field
10441044+ pub struct did(());
10451045+ ///Marker type for the `cid` field
10461046+ pub struct cid(());
10471047+ ///Marker type for the `domain` field
10481048+ pub struct domain(());
10491049+ ///Marker type for the `record` field
10501050+ pub struct record(());
10511051+ ///Marker type for the `name` field
10521052+ pub struct name(());
10531053+ ///Marker type for the `indexed_at` field
10541054+ pub struct indexed_at(());
10551055+ }
10561056+}
10571057+10581058+/// Builder for constructing an instance of this type
10591059+pub struct PublicationViewBuilder<'a, S: publication_view_state::State> {
10601060+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
10611061+ __unsafe_private_named: (
10621062+ ::core::option::Option<jacquard_common::types::string::Cid<'a>>,
10631063+ ::core::option::Option<jacquard_common::types::string::Did<'a>>,
10641064+ ::core::option::Option<jacquard_common::CowStr<'a>>,
10651065+ ::core::option::Option<jacquard_common::types::string::Datetime>,
10661066+ ::core::option::Option<jacquard_common::CowStr<'a>>,
10671067+ ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
10681068+ ::core::option::Option<jacquard_common::types::value::Data<'a>>,
10691069+ ::core::option::Option<jacquard_common::CowStr<'a>>,
10701070+ ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
10711071+ ),
10721072+ _phantom: ::core::marker::PhantomData<&'a ()>,
10731073+}
10741074+10751075+impl<'a> PublicationView<'a> {
10761076+ /// Create a new builder for this type
10771077+ pub fn new() -> PublicationViewBuilder<'a, publication_view_state::Empty> {
10781078+ PublicationViewBuilder::new()
10791079+ }
10801080+}
10811081+10821082+impl<'a> PublicationViewBuilder<'a, publication_view_state::Empty> {
10831083+ /// Create a new builder with all fields unset
10841084+ pub fn new() -> Self {
10851085+ PublicationViewBuilder {
10861086+ _phantom_state: ::core::marker::PhantomData,
10871087+ __unsafe_private_named: (
10881088+ None,
10891089+ None,
10901090+ None,
10911091+ None,
10921092+ None,
10931093+ None,
10941094+ None,
10951095+ None,
10961096+ None,
10971097+ ),
10981098+ _phantom: ::core::marker::PhantomData,
10991099+ }
11001100+ }
11011101+}
11021102+11031103+impl<'a, S> PublicationViewBuilder<'a, S>
11041104+where
11051105+ S: publication_view_state::State,
11061106+ S::Cid: publication_view_state::IsUnset,
11071107+{
11081108+ /// Set the `cid` field (required)
11091109+ pub fn cid(
11101110+ mut self,
11111111+ value: impl Into<jacquard_common::types::string::Cid<'a>>,
11121112+ ) -> PublicationViewBuilder<'a, publication_view_state::SetCid<S>> {
11131113+ self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
11141114+ PublicationViewBuilder {
11151115+ _phantom_state: ::core::marker::PhantomData,
11161116+ __unsafe_private_named: self.__unsafe_private_named,
11171117+ _phantom: ::core::marker::PhantomData,
11181118+ }
11191119+ }
11201120+}
11211121+11221122+impl<'a, S> PublicationViewBuilder<'a, S>
11231123+where
11241124+ S: publication_view_state::State,
11251125+ S::Did: publication_view_state::IsUnset,
11261126+{
11271127+ /// Set the `did` field (required)
11281128+ pub fn did(
11291129+ mut self,
11301130+ value: impl Into<jacquard_common::types::string::Did<'a>>,
11311131+ ) -> PublicationViewBuilder<'a, publication_view_state::SetDid<S>> {
11321132+ self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
11331133+ PublicationViewBuilder {
11341134+ _phantom_state: ::core::marker::PhantomData,
11351135+ __unsafe_private_named: self.__unsafe_private_named,
11361136+ _phantom: ::core::marker::PhantomData,
11371137+ }
11381138+ }
11391139+}
11401140+11411141+impl<'a, S> PublicationViewBuilder<'a, S>
11421142+where
11431143+ S: publication_view_state::State,
11441144+ S::Domain: publication_view_state::IsUnset,
11451145+{
11461146+ /// Set the `domain` field (required)
11471147+ pub fn domain(
11481148+ mut self,
11491149+ value: impl Into<jacquard_common::CowStr<'a>>,
11501150+ ) -> PublicationViewBuilder<'a, publication_view_state::SetDomain<S>> {
11511151+ self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
11521152+ PublicationViewBuilder {
11531153+ _phantom_state: ::core::marker::PhantomData,
11541154+ __unsafe_private_named: self.__unsafe_private_named,
11551155+ _phantom: ::core::marker::PhantomData,
11561156+ }
11571157+ }
11581158+}
11591159+11601160+impl<'a, S> PublicationViewBuilder<'a, S>
11611161+where
11621162+ S: publication_view_state::State,
11631163+ S::IndexedAt: publication_view_state::IsUnset,
11641164+{
11651165+ /// Set the `indexedAt` field (required)
11661166+ pub fn indexed_at(
11671167+ mut self,
11681168+ value: impl Into<jacquard_common::types::string::Datetime>,
11691169+ ) -> PublicationViewBuilder<'a, publication_view_state::SetIndexedAt<S>> {
11701170+ self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into());
11711171+ PublicationViewBuilder {
11721172+ _phantom_state: ::core::marker::PhantomData,
11731173+ __unsafe_private_named: self.__unsafe_private_named,
11741174+ _phantom: ::core::marker::PhantomData,
11751175+ }
11761176+ }
11771177+}
11781178+11791179+impl<'a, S> PublicationViewBuilder<'a, S>
11801180+where
11811181+ S: publication_view_state::State,
11821182+ S::Name: publication_view_state::IsUnset,
11831183+{
11841184+ /// Set the `name` field (required)
11851185+ pub fn name(
11861186+ mut self,
11871187+ value: impl Into<jacquard_common::CowStr<'a>>,
11881188+ ) -> PublicationViewBuilder<'a, publication_view_state::SetName<S>> {
11891189+ self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into());
11901190+ PublicationViewBuilder {
11911191+ _phantom_state: ::core::marker::PhantomData,
11921192+ __unsafe_private_named: self.__unsafe_private_named,
11931193+ _phantom: ::core::marker::PhantomData,
11941194+ }
11951195+ }
11961196+}
11971197+11981198+impl<'a, S: publication_view_state::State> PublicationViewBuilder<'a, S> {
11991199+ /// Set the `notebookUri` field (optional)
12001200+ pub fn notebook_uri(
12011201+ mut self,
12021202+ value: impl Into<Option<jacquard_common::types::string::AtUri<'a>>>,
12031203+ ) -> Self {
12041204+ self.__unsafe_private_named.5 = value.into();
12051205+ self
12061206+ }
12071207+ /// Set the `notebookUri` field to an Option value (optional)
12081208+ pub fn maybe_notebook_uri(
12091209+ mut self,
12101210+ value: Option<jacquard_common::types::string::AtUri<'a>>,
12111211+ ) -> Self {
12121212+ self.__unsafe_private_named.5 = value;
12131213+ self
12141214+ }
12151215+}
12161216+12171217+impl<'a, S> PublicationViewBuilder<'a, S>
12181218+where
12191219+ S: publication_view_state::State,
12201220+ S::Record: publication_view_state::IsUnset,
12211221+{
12221222+ /// Set the `record` field (required)
12231223+ pub fn record(
12241224+ mut self,
12251225+ value: impl Into<jacquard_common::types::value::Data<'a>>,
12261226+ ) -> PublicationViewBuilder<'a, publication_view_state::SetRecord<S>> {
12271227+ self.__unsafe_private_named.6 = ::core::option::Option::Some(value.into());
12281228+ PublicationViewBuilder {
12291229+ _phantom_state: ::core::marker::PhantomData,
12301230+ __unsafe_private_named: self.__unsafe_private_named,
12311231+ _phantom: ::core::marker::PhantomData,
12321232+ }
12331233+ }
12341234+}
12351235+12361236+impl<'a, S> PublicationViewBuilder<'a, S>
12371237+where
12381238+ S: publication_view_state::State,
12391239+ S::Rkey: publication_view_state::IsUnset,
12401240+{
12411241+ /// Set the `rkey` field (required)
12421242+ pub fn rkey(
12431243+ mut self,
12441244+ value: impl Into<jacquard_common::CowStr<'a>>,
12451245+ ) -> PublicationViewBuilder<'a, publication_view_state::SetRkey<S>> {
12461246+ self.__unsafe_private_named.7 = ::core::option::Option::Some(value.into());
12471247+ PublicationViewBuilder {
12481248+ _phantom_state: ::core::marker::PhantomData,
12491249+ __unsafe_private_named: self.__unsafe_private_named,
12501250+ _phantom: ::core::marker::PhantomData,
12511251+ }
12521252+ }
12531253+}
12541254+12551255+impl<'a, S> PublicationViewBuilder<'a, S>
12561256+where
12571257+ S: publication_view_state::State,
12581258+ S::Uri: publication_view_state::IsUnset,
12591259+{
12601260+ /// Set the `uri` field (required)
12611261+ pub fn uri(
12621262+ mut self,
12631263+ value: impl Into<jacquard_common::types::string::AtUri<'a>>,
12641264+ ) -> PublicationViewBuilder<'a, publication_view_state::SetUri<S>> {
12651265+ self.__unsafe_private_named.8 = ::core::option::Option::Some(value.into());
12661266+ PublicationViewBuilder {
12671267+ _phantom_state: ::core::marker::PhantomData,
12681268+ __unsafe_private_named: self.__unsafe_private_named,
12691269+ _phantom: ::core::marker::PhantomData,
12701270+ }
12711271+ }
12721272+}
12731273+12741274+impl<'a, S> PublicationViewBuilder<'a, S>
12751275+where
12761276+ S: publication_view_state::State,
12771277+ S::Uri: publication_view_state::IsSet,
12781278+ S::Rkey: publication_view_state::IsSet,
12791279+ S::Did: publication_view_state::IsSet,
12801280+ S::Cid: publication_view_state::IsSet,
12811281+ S::Domain: publication_view_state::IsSet,
12821282+ S::Record: publication_view_state::IsSet,
12831283+ S::Name: publication_view_state::IsSet,
12841284+ S::IndexedAt: publication_view_state::IsSet,
12851285+{
12861286+ /// Build the final struct
12871287+ pub fn build(self) -> PublicationView<'a> {
12881288+ PublicationView {
12891289+ cid: self.__unsafe_private_named.0.unwrap(),
12901290+ did: self.__unsafe_private_named.1.unwrap(),
12911291+ domain: self.__unsafe_private_named.2.unwrap(),
12921292+ indexed_at: self.__unsafe_private_named.3.unwrap(),
12931293+ name: self.__unsafe_private_named.4.unwrap(),
12941294+ notebook_uri: self.__unsafe_private_named.5,
12951295+ record: self.__unsafe_private_named.6.unwrap(),
12961296+ rkey: self.__unsafe_private_named.7.unwrap(),
12971297+ uri: self.__unsafe_private_named.8.unwrap(),
12981298+ extra_data: Default::default(),
12991299+ }
13001300+ }
13011301+ /// Build the final struct with custom extra_data
13021302+ pub fn build_with_data(
13031303+ self,
13041304+ extra_data: std::collections::BTreeMap<
13051305+ jacquard_common::smol_str::SmolStr,
13061306+ jacquard_common::types::value::Data<'a>,
13071307+ >,
13081308+ ) -> PublicationView<'a> {
13091309+ PublicationView {
13101310+ cid: self.__unsafe_private_named.0.unwrap(),
13111311+ did: self.__unsafe_private_named.1.unwrap(),
13121312+ domain: self.__unsafe_private_named.2.unwrap(),
13131313+ indexed_at: self.__unsafe_private_named.3.unwrap(),
13141314+ name: self.__unsafe_private_named.4.unwrap(),
13151315+ notebook_uri: self.__unsafe_private_named.5,
13161316+ record: self.__unsafe_private_named.6.unwrap(),
13171317+ rkey: self.__unsafe_private_named.7.unwrap(),
13181318+ uri: self.__unsafe_private_named.8.unwrap(),
13191319+ extra_data: Some(extra_data),
13201320+ }
13211321+ }
13221322+}
13231323+13241324+impl<'a> ::jacquard_lexicon::schema::LexiconSchema for PublicationView<'a> {
13251325+ fn nsid() -> &'static str {
13261326+ "sh.weaver.domain.defs"
13271327+ }
13281328+ fn def_name() -> &'static str {
13291329+ "publicationView"
13301330+ }
13311331+ fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
13321332+ lexicon_doc_sh_weaver_domain_defs()
13331333+ }
13341334+ fn validate(
13351335+ &self,
13361336+ ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
13371337+ Ok(())
13381338+ }
13391339+}
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// Lexicon: sh.weaver.domain.resolveDocument
44+//
55+// This file was automatically generated from Lexicon schemas.
66+// Any manual changes will be overwritten on the next regeneration.
77+88+#[derive(
99+ serde::Serialize,
1010+ serde::Deserialize,
1111+ Debug,
1212+ Clone,
1313+ PartialEq,
1414+ Eq,
1515+ jacquard_derive::IntoStatic
1616+)]
1717+#[serde(rename_all = "camelCase")]
1818+pub struct ResolveDocument<'a> {
1919+ #[serde(borrow)]
2020+ pub path: jacquard_common::CowStr<'a>,
2121+ #[serde(borrow)]
2222+ pub publication: jacquard_common::types::string::AtUri<'a>,
2323+}
2424+2525+pub mod resolve_document_state {
2626+2727+ pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
2828+ #[allow(unused)]
2929+ use ::core::marker::PhantomData;
3030+ mod sealed {
3131+ pub trait Sealed {}
3232+ }
3333+ /// State trait tracking which required fields have been set
3434+ pub trait State: sealed::Sealed {
3535+ type Path;
3636+ type Publication;
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 Path = Unset;
4343+ type Publication = Unset;
4444+ }
4545+ ///State transition - sets the `path` field to Set
4646+ pub struct SetPath<S: State = Empty>(PhantomData<fn() -> S>);
4747+ impl<S: State> sealed::Sealed for SetPath<S> {}
4848+ impl<S: State> State for SetPath<S> {
4949+ type Path = Set<members::path>;
5050+ type Publication = S::Publication;
5151+ }
5252+ ///State transition - sets the `publication` field to Set
5353+ pub struct SetPublication<S: State = Empty>(PhantomData<fn() -> S>);
5454+ impl<S: State> sealed::Sealed for SetPublication<S> {}
5555+ impl<S: State> State for SetPublication<S> {
5656+ type Path = S::Path;
5757+ type Publication = Set<members::publication>;
5858+ }
5959+ /// Marker types for field names
6060+ #[allow(non_camel_case_types)]
6161+ pub mod members {
6262+ ///Marker type for the `path` field
6363+ pub struct path(());
6464+ ///Marker type for the `publication` field
6565+ pub struct publication(());
6666+ }
6767+}
6868+6969+/// Builder for constructing an instance of this type
7070+pub struct ResolveDocumentBuilder<'a, S: resolve_document_state::State> {
7171+ _phantom_state: ::core::marker::PhantomData<fn() -> S>,
7272+ __unsafe_private_named: (
7373+ ::core::option::Option<jacquard_common::CowStr<'a>>,
7474+ ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
7575+ ),
7676+ _phantom: ::core::marker::PhantomData<&'a ()>,
7777+}
7878+7979+impl<'a> ResolveDocument<'a> {
8080+ /// Create a new builder for this type
8181+ pub fn new() -> ResolveDocumentBuilder<'a, resolve_document_state::Empty> {
8282+ ResolveDocumentBuilder::new()
8383+ }
8484+}
8585+8686+impl<'a> ResolveDocumentBuilder<'a, resolve_document_state::Empty> {
8787+ /// Create a new builder with all fields unset
8888+ pub fn new() -> Self {
8989+ ResolveDocumentBuilder {
9090+ _phantom_state: ::core::marker::PhantomData,
9191+ __unsafe_private_named: (None, None),
9292+ _phantom: ::core::marker::PhantomData,
9393+ }
9494+ }
9595+}
9696+9797+impl<'a, S> ResolveDocumentBuilder<'a, S>
9898+where
9999+ S: resolve_document_state::State,
100100+ S::Path: resolve_document_state::IsUnset,
101101+{
102102+ /// Set the `path` field (required)
103103+ pub fn path(
104104+ mut self,
105105+ value: impl Into<jacquard_common::CowStr<'a>>,
106106+ ) -> ResolveDocumentBuilder<'a, resolve_document_state::SetPath<S>> {
107107+ self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
108108+ ResolveDocumentBuilder {
109109+ _phantom_state: ::core::marker::PhantomData,
110110+ __unsafe_private_named: self.__unsafe_private_named,
111111+ _phantom: ::core::marker::PhantomData,
112112+ }
113113+ }
114114+}
115115+116116+impl<'a, S> ResolveDocumentBuilder<'a, S>
117117+where
118118+ S: resolve_document_state::State,
119119+ S::Publication: resolve_document_state::IsUnset,
120120+{
121121+ /// Set the `publication` field (required)
122122+ pub fn publication(
123123+ mut self,
124124+ value: impl Into<jacquard_common::types::string::AtUri<'a>>,
125125+ ) -> ResolveDocumentBuilder<'a, resolve_document_state::SetPublication<S>> {
126126+ self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
127127+ ResolveDocumentBuilder {
128128+ _phantom_state: ::core::marker::PhantomData,
129129+ __unsafe_private_named: self.__unsafe_private_named,
130130+ _phantom: ::core::marker::PhantomData,
131131+ }
132132+ }
133133+}
134134+135135+impl<'a, S> ResolveDocumentBuilder<'a, S>
136136+where
137137+ S: resolve_document_state::State,
138138+ S::Path: resolve_document_state::IsSet,
139139+ S::Publication: resolve_document_state::IsSet,
140140+{
141141+ /// Build the final struct
142142+ pub fn build(self) -> ResolveDocument<'a> {
143143+ ResolveDocument {
144144+ path: self.__unsafe_private_named.0.unwrap(),
145145+ publication: self.__unsafe_private_named.1.unwrap(),
146146+ }
147147+ }
148148+}
149149+150150+#[jacquard_derive::lexicon]
151151+#[derive(
152152+ serde::Serialize,
153153+ serde::Deserialize,
154154+ Debug,
155155+ Clone,
156156+ PartialEq,
157157+ Eq,
158158+ jacquard_derive::IntoStatic
159159+)]
160160+#[serde(rename_all = "camelCase")]
161161+pub struct ResolveDocumentOutput<'a> {
162162+ #[serde(borrow)]
163163+ pub document: crate::sh_weaver::domain::DocumentView<'a>,
164164+}
165165+166166+#[jacquard_derive::open_union]
167167+#[derive(
168168+ serde::Serialize,
169169+ serde::Deserialize,
170170+ Debug,
171171+ Clone,
172172+ PartialEq,
173173+ Eq,
174174+ thiserror::Error,
175175+ miette::Diagnostic,
176176+ jacquard_derive::IntoStatic
177177+)]
178178+#[serde(tag = "error", content = "message")]
179179+#[serde(bound(deserialize = "'de: 'a"))]
180180+pub enum ResolveDocumentError<'a> {
181181+ #[serde(rename = "PublicationNotFound")]
182182+ PublicationNotFound(std::option::Option<jacquard_common::CowStr<'a>>),
183183+ #[serde(rename = "DocumentNotFound")]
184184+ DocumentNotFound(std::option::Option<jacquard_common::CowStr<'a>>),
185185+}
186186+187187+impl core::fmt::Display for ResolveDocumentError<'_> {
188188+ fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
189189+ match self {
190190+ Self::PublicationNotFound(msg) => {
191191+ write!(f, "PublicationNotFound")?;
192192+ if let Some(msg) = msg {
193193+ write!(f, ": {}", msg)?;
194194+ }
195195+ Ok(())
196196+ }
197197+ Self::DocumentNotFound(msg) => {
198198+ write!(f, "DocumentNotFound")?;
199199+ if let Some(msg) = msg {
200200+ write!(f, ": {}", msg)?;
201201+ }
202202+ Ok(())
203203+ }
204204+ Self::Unknown(err) => write!(f, "Unknown error: {:?}", err),
205205+ }
206206+ }
207207+}
208208+209209+/// Response type for
210210+///sh.weaver.domain.resolveDocument
211211+pub struct ResolveDocumentResponse;
212212+impl jacquard_common::xrpc::XrpcResp for ResolveDocumentResponse {
213213+ const NSID: &'static str = "sh.weaver.domain.resolveDocument";
214214+ const ENCODING: &'static str = "application/json";
215215+ type Output<'de> = ResolveDocumentOutput<'de>;
216216+ type Err<'de> = ResolveDocumentError<'de>;
217217+}
218218+219219+impl<'a> jacquard_common::xrpc::XrpcRequest for ResolveDocument<'a> {
220220+ const NSID: &'static str = "sh.weaver.domain.resolveDocument";
221221+ const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
222222+ type Response = ResolveDocumentResponse;
223223+}
224224+225225+/// Endpoint type for
226226+///sh.weaver.domain.resolveDocument
227227+pub struct ResolveDocumentRequest;
228228+impl jacquard_common::xrpc::XrpcEndpoint for ResolveDocumentRequest {
229229+ const PATH: &'static str = "/xrpc/sh.weaver.domain.resolveDocument";
230230+ const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
231231+ type Request<'de> = ResolveDocument<'de>;
232232+ type Response = ResolveDocumentResponse;
233233+}
+60-60
crates/weaver-api/src/sh_weaver/edit.rs
···723723 pub trait State: sealed::Sealed {
724724 type Length;
725725 type Author;
726726- type Head;
727726 type LastUpdated;
727727+ type Head;
728728 }
729729 /// Empty state - all required fields are unset
730730 pub struct Empty(());
···732732 impl State for Empty {
733733 type Length = Unset;
734734 type Author = Unset;
735735- type Head = Unset;
736735 type LastUpdated = Unset;
736736+ type Head = Unset;
737737 }
738738 ///State transition - sets the `length` field to Set
739739 pub struct SetLength<S: State = Empty>(PhantomData<fn() -> S>);
···741741 impl<S: State> State for SetLength<S> {
742742 type Length = Set<members::length>;
743743 type Author = S::Author;
744744- type Head = S::Head;
745744 type LastUpdated = S::LastUpdated;
745745+ type Head = S::Head;
746746 }
747747 ///State transition - sets the `author` field to Set
748748 pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
···750750 impl<S: State> State for SetAuthor<S> {
751751 type Length = S::Length;
752752 type Author = Set<members::author>;
753753- type Head = S::Head;
754753 type LastUpdated = S::LastUpdated;
755755- }
756756- ///State transition - sets the `head` field to Set
757757- pub struct SetHead<S: State = Empty>(PhantomData<fn() -> S>);
758758- impl<S: State> sealed::Sealed for SetHead<S> {}
759759- impl<S: State> State for SetHead<S> {
760760- type Length = S::Length;
761761- type Author = S::Author;
762762- type Head = Set<members::head>;
763763- type LastUpdated = S::LastUpdated;
754754+ type Head = S::Head;
764755 }
765756 ///State transition - sets the `last_updated` field to Set
766757 pub struct SetLastUpdated<S: State = Empty>(PhantomData<fn() -> S>);
···768759 impl<S: State> State for SetLastUpdated<S> {
769760 type Length = S::Length;
770761 type Author = S::Author;
762762+ type LastUpdated = Set<members::last_updated>;
771763 type Head = S::Head;
772772- type LastUpdated = Set<members::last_updated>;
764764+ }
765765+ ///State transition - sets the `head` field to Set
766766+ pub struct SetHead<S: State = Empty>(PhantomData<fn() -> S>);
767767+ impl<S: State> sealed::Sealed for SetHead<S> {}
768768+ impl<S: State> State for SetHead<S> {
769769+ type Length = S::Length;
770770+ type Author = S::Author;
771771+ type LastUpdated = S::LastUpdated;
772772+ type Head = Set<members::head>;
773773 }
774774 /// Marker types for field names
775775 #[allow(non_camel_case_types)]
···778778 pub struct length(());
779779 ///Marker type for the `author` field
780780 pub struct author(());
781781- ///Marker type for the `head` field
782782- pub struct head(());
783781 ///Marker type for the `last_updated` field
784782 pub struct last_updated(());
783783+ ///Marker type for the `head` field
784784+ pub struct head(());
785785 }
786786}
787787···950950 S: edit_branch_view_state::State,
951951 S::Length: edit_branch_view_state::IsSet,
952952 S::Author: edit_branch_view_state::IsSet,
953953- S::Head: edit_branch_view_state::IsSet,
954953 S::LastUpdated: edit_branch_view_state::IsSet,
954954+ S::Head: edit_branch_view_state::IsSet,
955955{
956956 /// Build the final struct
957957 pub fn build(self) -> EditBranchView<'a> {
···10531053 }
10541054 /// State trait tracking which required fields have been set
10551055 pub trait State: sealed::Sealed {
10561056+ type CreatedAt;
10571057+ type Author;
10561058 type Cid;
10591059+ type Type;
10571060 type Uri;
10581058- type Author;
10591059- type CreatedAt;
10601060- type Type;
10611061 }
10621062 /// Empty state - all required fields are unset
10631063 pub struct Empty(());
10641064 impl sealed::Sealed for Empty {}
10651065 impl State for Empty {
10661066- type Cid = Unset;
10671067- type Uri = Unset;
10661066+ type CreatedAt = Unset;
10681067 type Author = Unset;
10691069- type CreatedAt = Unset;
10681068+ type Cid = Unset;
10701069 type Type = Unset;
10701070+ type Uri = Unset;
10711071 }
10721072- ///State transition - sets the `cid` field to Set
10731073- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
10741074- impl<S: State> sealed::Sealed for SetCid<S> {}
10751075- impl<S: State> State for SetCid<S> {
10761076- type Cid = Set<members::cid>;
10771077- type Uri = S::Uri;
10721072+ ///State transition - sets the `created_at` field to Set
10731073+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
10741074+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
10751075+ impl<S: State> State for SetCreatedAt<S> {
10761076+ type CreatedAt = Set<members::created_at>;
10781077 type Author = S::Author;
10791079- type CreatedAt = S::CreatedAt;
10801080- type Type = S::Type;
10811081- }
10821082- ///State transition - sets the `uri` field to Set
10831083- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
10841084- impl<S: State> sealed::Sealed for SetUri<S> {}
10851085- impl<S: State> State for SetUri<S> {
10861078 type Cid = S::Cid;
10871087- type Uri = Set<members::uri>;
10881088- type Author = S::Author;
10891089- type CreatedAt = S::CreatedAt;
10901079 type Type = S::Type;
10801080+ type Uri = S::Uri;
10911081 }
10921082 ///State transition - sets the `author` field to Set
10931083 pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
10941084 impl<S: State> sealed::Sealed for SetAuthor<S> {}
10951085 impl<S: State> State for SetAuthor<S> {
10861086+ type CreatedAt = S::CreatedAt;
10871087+ type Author = Set<members::author>;
10961088 type Cid = S::Cid;
10891089+ type Type = S::Type;
10971090 type Uri = S::Uri;
10981098- type Author = Set<members::author>;
10911091+ }
10921092+ ///State transition - sets the `cid` field to Set
10931093+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
10941094+ impl<S: State> sealed::Sealed for SetCid<S> {}
10951095+ impl<S: State> State for SetCid<S> {
10991096 type CreatedAt = S::CreatedAt;
11001100- type Type = S::Type;
11011101- }
11021102- ///State transition - sets the `created_at` field to Set
11031103- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
11041104- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
11051105- impl<S: State> State for SetCreatedAt<S> {
11061106- type Cid = S::Cid;
11071107- type Uri = S::Uri;
11081097 type Author = S::Author;
11091109- type CreatedAt = Set<members::created_at>;
10981098+ type Cid = Set<members::cid>;
11101099 type Type = S::Type;
11001100+ type Uri = S::Uri;
11111101 }
11121102 ///State transition - sets the `type` field to Set
11131103 pub struct SetType<S: State = Empty>(PhantomData<fn() -> S>);
11141104 impl<S: State> sealed::Sealed for SetType<S> {}
11151105 impl<S: State> State for SetType<S> {
11061106+ type CreatedAt = S::CreatedAt;
11071107+ type Author = S::Author;
11161108 type Cid = S::Cid;
11091109+ type Type = Set<members::r#type>;
11171110 type Uri = S::Uri;
11181118- type Author = S::Author;
11111111+ }
11121112+ ///State transition - sets the `uri` field to Set
11131113+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
11141114+ impl<S: State> sealed::Sealed for SetUri<S> {}
11151115+ impl<S: State> State for SetUri<S> {
11191116 type CreatedAt = S::CreatedAt;
11201120- type Type = Set<members::r#type>;
11171117+ type Author = S::Author;
11181118+ type Cid = S::Cid;
11191119+ type Type = S::Type;
11201120+ type Uri = Set<members::uri>;
11211121 }
11221122 /// Marker types for field names
11231123 #[allow(non_camel_case_types)]
11241124 pub mod members {
11251125+ ///Marker type for the `created_at` field
11261126+ pub struct created_at(());
11271127+ ///Marker type for the `author` field
11281128+ pub struct author(());
11251129 ///Marker type for the `cid` field
11261130 pub struct cid(());
11311131+ ///Marker type for the `type` field
11321132+ pub struct r#type(());
11271133 ///Marker type for the `uri` field
11281134 pub struct uri(());
11291129- ///Marker type for the `author` field
11301130- pub struct author(());
11311131- ///Marker type for the `created_at` field
11321132- pub struct created_at(());
11331133- ///Marker type for the `type` field
11341134- pub struct r#type(());
11351135 }
11361136}
11371137···13481348impl<'a, S> EditHistoryEntryBuilder<'a, S>
13491349where
13501350 S: edit_history_entry_state::State,
13511351- S::Cid: edit_history_entry_state::IsSet,
13521352- S::Uri: edit_history_entry_state::IsSet,
13531353- S::Author: edit_history_entry_state::IsSet,
13541351 S::CreatedAt: edit_history_entry_state::IsSet,
13521352+ S::Author: edit_history_entry_state::IsSet,
13531353+ S::Cid: edit_history_entry_state::IsSet,
13551354 S::Type: edit_history_entry_state::IsSet,
13551355+ S::Uri: edit_history_entry_state::IsSet,
13561356{
13571357 /// Build the final struct
13581358 pub fn build(self) -> EditHistoryEntry<'a> {
+28-28
crates/weaver-api/src/sh_weaver/edit/cursor.rs
···586586 }
587587 /// State trait tracking which required fields have been set
588588 pub trait State: sealed::Sealed {
589589- type Counter;
590589 type Peer;
590590+ type Counter;
591591 }
592592 /// Empty state - all required fields are unset
593593 pub struct Empty(());
594594 impl sealed::Sealed for Empty {}
595595 impl State for Empty {
596596- type Counter = Unset;
597596 type Peer = Unset;
598598- }
599599- ///State transition - sets the `counter` field to Set
600600- pub struct SetCounter<S: State = Empty>(PhantomData<fn() -> S>);
601601- impl<S: State> sealed::Sealed for SetCounter<S> {}
602602- impl<S: State> State for SetCounter<S> {
603603- type Counter = Set<members::counter>;
604604- type Peer = S::Peer;
597597+ type Counter = Unset;
605598 }
606599 ///State transition - sets the `peer` field to Set
607600 pub struct SetPeer<S: State = Empty>(PhantomData<fn() -> S>);
608601 impl<S: State> sealed::Sealed for SetPeer<S> {}
609602 impl<S: State> State for SetPeer<S> {
610610- type Counter = S::Counter;
611603 type Peer = Set<members::peer>;
604604+ type Counter = S::Counter;
605605+ }
606606+ ///State transition - sets the `counter` field to Set
607607+ pub struct SetCounter<S: State = Empty>(PhantomData<fn() -> S>);
608608+ impl<S: State> sealed::Sealed for SetCounter<S> {}
609609+ impl<S: State> State for SetCounter<S> {
610610+ type Peer = S::Peer;
611611+ type Counter = Set<members::counter>;
612612 }
613613 /// Marker types for field names
614614 #[allow(non_camel_case_types)]
615615 pub mod members {
616616- ///Marker type for the `counter` field
617617- pub struct counter(());
618616 ///Marker type for the `peer` field
619617 pub struct peer(());
618618+ ///Marker type for the `counter` field
619619+ pub struct counter(());
620620 }
621621}
622622···683683impl<'a, S> IdBuilder<'a, S>
684684where
685685 S: id_state::State,
686686- S::Counter: id_state::IsSet,
687686 S::Peer: id_state::IsSet,
687687+ S::Counter: id_state::IsSet,
688688{
689689 /// Build the final struct
690690 pub fn build(self) -> Id<'a> {
···10171017 }
10181018 /// State trait tracking which required fields have been set
10191019 pub trait State: sealed::Sealed {
10201020+ type Peer;
10201021 type Counter;
10211022 type ContainerType;
10221022- type Peer;
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;
10281029 type Counter = Unset;
10291030 type ContainerType = Unset;
10301030- type Peer = 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;
10311039 }
10321040 ///State transition - sets the `counter` field to Set
10331041 pub struct SetCounter<S: State = Empty>(PhantomData<fn() -> S>);
10341042 impl<S: State> sealed::Sealed for SetCounter<S> {}
10351043 impl<S: State> State for SetCounter<S> {
10441044+ type Peer = S::Peer;
10361045 type Counter = Set<members::counter>;
10371046 type ContainerType = S::ContainerType;
10381038- type Peer = S::Peer;
10391047 }
10401048 ///State transition - sets the `container_type` field to Set
10411049 pub struct SetContainerType<S: State = Empty>(PhantomData<fn() -> S>);
10421050 impl<S: State> sealed::Sealed for SetContainerType<S> {}
10431051 impl<S: State> State for SetContainerType<S> {
10441044- type Counter = S::Counter;
10451045- type ContainerType = Set<members::container_type>;
10461052 type Peer = S::Peer;
10471047- }
10481048- ///State transition - sets the `peer` field to Set
10491049- pub struct SetPeer<S: State = Empty>(PhantomData<fn() -> S>);
10501050- impl<S: State> sealed::Sealed for SetPeer<S> {}
10511051- impl<S: State> State for SetPeer<S> {
10521053 type Counter = S::Counter;
10531053- type ContainerType = S::ContainerType;
10541054- type Peer = Set<members::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(());
10591061 ///Marker type for the `counter` field
10601062 pub struct counter(());
10611063 ///Marker type for the `container_type` field
10621064 pub struct container_type(());
10631063- ///Marker type for the `peer` field
10641064- pub struct peer(());
10651065 }
10661066}
10671067···11541154impl<'a, S> NormalContainerIdBuilder<'a, S>
11551155where
11561156 S: normal_container_id_state::State,
11571157+ S::Peer: normal_container_id_state::IsSet,
11571158 S::Counter: normal_container_id_state::IsSet,
11581159 S::ContainerType: normal_container_id_state::IsSet,
11591159- S::Peer: normal_container_id_state::IsSet,
11601160{
11611161 /// Build the final struct
11621162 pub fn build(self) -> NormalContainerId<'a> {
+13-13
crates/weaver-api/src/sh_weaver/edit/diff.rs
···4747 }
4848 /// State trait tracking which required fields have been set
4949 pub trait State: sealed::Sealed {
5050- type Doc;
5150 type Root;
5151+ type Doc;
5252 }
5353 /// Empty state - all required fields are unset
5454 pub struct Empty(());
5555 impl sealed::Sealed for Empty {}
5656 impl State for Empty {
5757- type Doc = Unset;
5857 type Root = Unset;
5959- }
6060- ///State transition - sets the `doc` field to Set
6161- pub struct SetDoc<S: State = Empty>(PhantomData<fn() -> S>);
6262- impl<S: State> sealed::Sealed for SetDoc<S> {}
6363- impl<S: State> State for SetDoc<S> {
6464- type Doc = Set<members::doc>;
6565- type Root = S::Root;
5858+ type Doc = Unset;
6659 }
6760 ///State transition - sets the `root` field to Set
6861 pub struct SetRoot<S: State = Empty>(PhantomData<fn() -> S>);
6962 impl<S: State> sealed::Sealed for SetRoot<S> {}
7063 impl<S: State> State for SetRoot<S> {
7171- type Doc = S::Doc;
7264 type Root = Set<members::root>;
6565+ type Doc = S::Doc;
6666+ }
6767+ ///State transition - sets the `doc` field to Set
6868+ pub struct SetDoc<S: State = Empty>(PhantomData<fn() -> S>);
6969+ impl<S: State> sealed::Sealed for SetDoc<S> {}
7070+ impl<S: State> State for SetDoc<S> {
7171+ type Root = S::Root;
7272+ type Doc = Set<members::doc>;
7373 }
7474 /// Marker types for field names
7575 #[allow(non_camel_case_types)]
7676 pub mod members {
7777- ///Marker type for the `doc` field
7878- pub struct doc(());
7977 ///Marker type for the `root` field
8078 pub struct root(());
7979+ ///Marker type for the `doc` field
8080+ pub struct doc(());
8181 }
8282}
8383···224224impl<'a, S> DiffBuilder<'a, S>
225225where
226226 S: diff_state::State,
227227- S::Doc: diff_state::IsSet,
228227 S::Root: diff_state::IsSet,
228228+ S::Doc: diff_state::IsSet,
229229{
230230 /// Build the final struct
231231 pub fn build(self) -> Diff<'a> {
···4747 }
4848 /// State trait tracking which required fields have been set
4949 pub trait State: sealed::Sealed {
5050- type CreatedAt;
5150 type Uri;
5251 type Cid;
5252+ type CreatedAt;
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 CreatedAt = Unset;
5958 type Uri = Unset;
6059 type Cid = Unset;
6161- }
6262- ///State transition - sets the `created_at` field to Set
6363- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
6464- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
6565- impl<S: State> State for SetCreatedAt<S> {
6666- type CreatedAt = Set<members::created_at>;
6767- type Uri = S::Uri;
6868- type Cid = S::Cid;
6060+ type CreatedAt = Unset;
6961 }
7062 ///State transition - sets the `uri` field to Set
7163 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
7264 impl<S: State> sealed::Sealed for SetUri<S> {}
7365 impl<S: State> State for SetUri<S> {
7474- type CreatedAt = S::CreatedAt;
7566 type Uri = Set<members::uri>;
7667 type Cid = S::Cid;
6868+ type CreatedAt = S::CreatedAt;
7769 }
7870 ///State transition - sets the `cid` field to Set
7971 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
8072 impl<S: State> sealed::Sealed for SetCid<S> {}
8173 impl<S: State> State for SetCid<S> {
8282- type CreatedAt = S::CreatedAt;
8374 type Uri = S::Uri;
8475 type Cid = Set<members::cid>;
7676+ type CreatedAt = S::CreatedAt;
7777+ }
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 Uri = S::Uri;
8383+ type Cid = S::Cid;
8484+ type CreatedAt = Set<members::created_at>;
8585 }
8686 /// Marker types for field names
8787 #[allow(non_camel_case_types)]
8888 pub mod members {
8989- ///Marker type for the `created_at` field
9090- pub struct created_at(());
9189 ///Marker type for the `uri` field
9290 pub struct uri(());
9391 ///Marker type for the `cid` field
9492 pub struct cid(());
9393+ ///Marker type for the `created_at` field
9494+ pub struct created_at(());
9595 }
9696}
9797···241241impl<'a, S> DraftViewBuilder<'a, S>
242242where
243243 S: draft_view_state::State,
244244- S::CreatedAt: draft_view_state::IsSet,
245244 S::Uri: draft_view_state::IsSet,
246245 S::Cid: draft_view_state::IsSet,
246246+ S::CreatedAt: draft_view_state::IsSet,
247247{
248248 /// Build the final struct
249249 pub fn build(self) -> DraftView<'a> {
+13-13
crates/weaver-api/src/sh_weaver/edit/root.rs
···3434 }
3535 /// State trait tracking which required fields have been set
3636 pub trait State: sealed::Sealed {
3737- type Doc;
3837 type Snapshot;
3838+ type Doc;
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 Doc = Unset;
4544 type Snapshot = Unset;
4646- }
4747- ///State transition - sets the `doc` field to Set
4848- pub struct SetDoc<S: State = Empty>(PhantomData<fn() -> S>);
4949- impl<S: State> sealed::Sealed for SetDoc<S> {}
5050- impl<S: State> State for SetDoc<S> {
5151- type Doc = Set<members::doc>;
5252- type Snapshot = S::Snapshot;
4545+ type Doc = Unset;
5346 }
5447 ///State transition - sets the `snapshot` field to Set
5548 pub struct SetSnapshot<S: State = Empty>(PhantomData<fn() -> S>);
5649 impl<S: State> sealed::Sealed for SetSnapshot<S> {}
5750 impl<S: State> State for SetSnapshot<S> {
5858- type Doc = S::Doc;
5951 type Snapshot = Set<members::snapshot>;
5252+ type Doc = S::Doc;
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 Snapshot = S::Snapshot;
5959+ type Doc = Set<members::doc>;
6060 }
6161 /// Marker types for field names
6262 #[allow(non_camel_case_types)]
6363 pub mod members {
6464- ///Marker type for the `doc` field
6565- pub struct doc(());
6664 ///Marker type for the `snapshot` field
6765 pub struct snapshot(());
6666+ ///Marker type for the `doc` field
6767+ pub struct doc(());
6868 }
6969}
7070···137137impl<'a, S> RootBuilder<'a, S>
138138where
139139 S: root_state::State,
140140- S::Doc: root_state::IsSet,
141140 S::Snapshot: root_state::IsSet,
141141+ S::Doc: root_state::IsSet,
142142{
143143 /// Build the final struct
144144 pub fn build(self) -> Root<'a> {
+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 Height;
316315 type Width;
316316+ type Height;
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 Height = Unset;
323322 type Width = Unset;
324324- }
325325- ///State transition - sets the `height` field to Set
326326- pub struct SetHeight<S: State = Empty>(PhantomData<fn() -> S>);
327327- impl<S: State> sealed::Sealed for SetHeight<S> {}
328328- impl<S: State> State for SetHeight<S> {
329329- type Height = Set<members::height>;
330330- type Width = S::Width;
323323+ type Height = Unset;
331324 }
332325 ///State transition - sets the `width` field to Set
333326 pub struct SetWidth<S: State = Empty>(PhantomData<fn() -> S>);
334327 impl<S: State> sealed::Sealed for SetWidth<S> {}
335328 impl<S: State> State for SetWidth<S> {
336336- type Height = S::Height;
337329 type Width = Set<members::width>;
330330+ type Height = S::Height;
331331+ }
332332+ ///State transition - sets the `height` field to Set
333333+ pub struct SetHeight<S: State = Empty>(PhantomData<fn() -> S>);
334334+ impl<S: State> sealed::Sealed for SetHeight<S> {}
335335+ impl<S: State> State for SetHeight<S> {
336336+ type Width = S::Width;
337337+ type Height = Set<members::height>;
338338 }
339339 /// Marker types for field names
340340 #[allow(non_camel_case_types)]
341341 pub mod members {
342342- ///Marker type for the `height` field
343343- pub struct height(());
344342 ///Marker type for the `width` field
345343 pub struct width(());
344344+ ///Marker type for the `height` field
345345+ pub struct height(());
346346 }
347347}
348348···412412impl<'a, S> PixelSizeBuilder<'a, S>
413413where
414414 S: pixel_size_state::State,
415415- S::Height: pixel_size_state::IsSet,
416415 S::Width: pixel_size_state::IsSet,
416416+ S::Height: pixel_size_state::IsSet,
417417{
418418 /// Build the final struct
419419 pub fn build(self) -> PixelSize<'a> {
+30-30
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;
4241 type Title;
4242+ 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 Description = Unset;
5049 type Title = Unset;
5050+ type Description = Unset;
5151 type Uri = 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 Title = S::Title;
5959- type Uri = S::Uri;
6060- }
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 Description = S::Description;
6657 type Title = Set<members::title>;
5858+ type Description = S::Description;
5959+ type Uri = S::Uri;
6060+ }
6161+ ///State transition - sets the `description` field to Set
6262+ pub struct SetDescription<S: State = Empty>(PhantomData<fn() -> S>);
6363+ impl<S: State> sealed::Sealed for SetDescription<S> {}
6464+ impl<S: State> State for SetDescription<S> {
6565+ type Title = S::Title;
6666+ 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 Description = S::Description;
7473 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 `title` field
8181+ pub struct title(());
8082 ///Marker type for the `description` field
8183 pub struct description(());
8282- ///Marker type for the `title` field
8383- pub struct title(());
8484 ///Marker type for the `uri` field
8585 pub struct uri(());
8686 }
···195195impl<'a, S> ExternalEmbedBuilder<'a, S>
196196where
197197 S: external_embed_state::State,
198198- S::Description: external_embed_state::IsSet,
199198 S::Title: external_embed_state::IsSet,
199199+ S::Description: external_embed_state::IsSet,
200200 S::Uri: external_embed_state::IsSet,
201201{
202202 /// Build the final struct
···818818 /// State trait tracking which required fields have been set
819819 pub trait State: sealed::Sealed {
820820 type Uri;
821821- type Description;
822821 type Title;
822822+ type Description;
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 Uri = Unset;
829829- type Description = Unset;
830829 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>;
837837- type Description = S::Description;
838837 type Title = S::Title;
839839- }
840840- ///State transition - sets the `description` field to Set
841841- pub struct SetDescription<S: State = Empty>(PhantomData<fn() -> S>);
842842- impl<S: State> sealed::Sealed for SetDescription<S> {}
843843- impl<S: State> State for SetDescription<S> {
844844- type Uri = S::Uri;
845845- type Description = Set<members::description>;
846846- type Title = S::Title;
838838+ type Description = S::Description;
847839 }
848840 ///State transition - sets the `title` field to Set
849841 pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
850842 impl<S: State> sealed::Sealed for SetTitle<S> {}
851843 impl<S: State> State for SetTitle<S> {
852844 type Uri = S::Uri;
853853- type Description = S::Description;
854845 type Title = Set<members::title>;
846846+ type Description = S::Description;
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;
853853+ type Title = S::Title;
854854+ type Description = Set<members::description>;
855855 }
856856 /// Marker types for field names
857857 #[allow(non_camel_case_types)]
858858 pub mod members {
859859 ///Marker type for the `uri` field
860860 pub struct uri(());
861861+ ///Marker type for the `title` field
862862+ pub struct title(());
861863 ///Marker type for the `description` field
862864 pub struct description(());
863863- ///Marker type for the `title` field
864864- pub struct title(());
865865 }
866866}
867867···975975where
976976 S: view_external_state::State,
977977 S::Uri: view_external_state::IsSet,
978978- S::Description: view_external_state::IsSet,
979978 S::Title: view_external_state::IsSet,
979979+ S::Description: view_external_state::IsSet,
980980{
981981 /// Build the final struct
982982 pub fn build(self) -> ViewExternal<'a> {
+15-15
crates/weaver-api/src/sh_weaver/embed/images.rs
···902902 }
903903 /// State trait tracking which required fields have been set
904904 pub trait State: sealed::Sealed {
905905- type Alt;
906905 type Thumb;
907906 type Fullsize;
907907+ type Alt;
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 Alt = Unset;
914913 type Thumb = Unset;
915914 type Fullsize = Unset;
916916- }
917917- ///State transition - sets the `alt` field to Set
918918- pub struct SetAlt<S: State = Empty>(PhantomData<fn() -> S>);
919919- impl<S: State> sealed::Sealed for SetAlt<S> {}
920920- impl<S: State> State for SetAlt<S> {
921921- type Alt = Set<members::alt>;
922922- type Thumb = S::Thumb;
923923- type Fullsize = S::Fullsize;
915915+ type Alt = Unset;
924916 }
925917 ///State transition - sets the `thumb` field to Set
926918 pub struct SetThumb<S: State = Empty>(PhantomData<fn() -> S>);
927919 impl<S: State> sealed::Sealed for SetThumb<S> {}
928920 impl<S: State> State for SetThumb<S> {
929929- type Alt = S::Alt;
930921 type Thumb = Set<members::thumb>;
931922 type Fullsize = S::Fullsize;
923923+ type Alt = S::Alt;
932924 }
933925 ///State transition - sets the `fullsize` field to Set
934926 pub struct SetFullsize<S: State = Empty>(PhantomData<fn() -> S>);
935927 impl<S: State> sealed::Sealed for SetFullsize<S> {}
936928 impl<S: State> State for SetFullsize<S> {
937937- type Alt = S::Alt;
938929 type Thumb = S::Thumb;
939930 type Fullsize = Set<members::fullsize>;
931931+ type Alt = S::Alt;
932932+ }
933933+ ///State transition - sets the `alt` field to Set
934934+ pub struct SetAlt<S: State = Empty>(PhantomData<fn() -> S>);
935935+ impl<S: State> sealed::Sealed for SetAlt<S> {}
936936+ impl<S: State> State for SetAlt<S> {
937937+ type Thumb = S::Thumb;
938938+ type Fullsize = S::Fullsize;
939939+ type Alt = Set<members::alt>;
940940 }
941941 /// Marker types for field names
942942 #[allow(non_camel_case_types)]
943943 pub mod members {
944944- ///Marker type for the `alt` field
945945- pub struct alt(());
946944 ///Marker type for the `thumb` field
947945 pub struct thumb(());
948946 ///Marker type for the `fullsize` field
949947 pub struct fullsize(());
948948+ ///Marker type for the `alt` field
949949+ pub struct alt(());
950950 }
951951}
952952···10731073impl<'a, S> ViewImageBuilder<'a, S>
10741074where
10751075 S: view_image_state::State,
10761076- S::Alt: view_image_state::IsSet,
10771076 S::Thumb: view_image_state::IsSet,
10781077 S::Fullsize: view_image_state::IsSet,
10781078+ S::Alt: 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> {
+32-32
crates/weaver-api/src/sh_weaver/embed/records.rs
···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 Uri = Unset;
15831582 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;
15831583+ type Uri = Unset;
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> {
···17711771 pub trait State: sealed::Sealed {
17721772 type Cid;
17731773 type Uri;
17741774- type Value;
17751774 type Author;
17751775+ type Value;
17761776 type IndexedAt;
17771777 }
17781778 /// Empty state - all required fields are unset
···17811781 impl State for Empty {
17821782 type Cid = Unset;
17831783 type Uri = Unset;
17841784- type Value = Unset;
17851784 type Author = Unset;
17851785+ type Value = Unset;
17861786 type IndexedAt = Unset;
17871787 }
17881788 ///State transition - sets the `cid` field to Set
···17911791 impl<S: State> State for SetCid<S> {
17921792 type Cid = Set<members::cid>;
17931793 type Uri = S::Uri;
17941794- type Value = S::Value;
17951794 type Author = S::Author;
17951795+ type Value = S::Value;
17961796 type IndexedAt = S::IndexedAt;
17971797 }
17981798 ///State transition - sets the `uri` field to Set
···18011801 impl<S: State> State for SetUri<S> {
18021802 type Cid = S::Cid;
18031803 type Uri = Set<members::uri>;
18041804- type Value = S::Value;
18051804 type Author = S::Author;
18061806- type IndexedAt = S::IndexedAt;
18071807- }
18081808- ///State transition - sets the `value` field to Set
18091809- pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
18101810- impl<S: State> sealed::Sealed for SetValue<S> {}
18111811- impl<S: State> State for SetValue<S> {
18121812- type Cid = S::Cid;
18131813- type Uri = S::Uri;
18141814- type Value = Set<members::value>;
18151815- type Author = S::Author;
18051805+ type Value = S::Value;
18161806 type IndexedAt = S::IndexedAt;
18171807 }
18181808 ///State transition - sets the `author` field to Set
···18211811 impl<S: State> State for SetAuthor<S> {
18221812 type Cid = S::Cid;
18231813 type Uri = S::Uri;
18241824- type Value = S::Value;
18251814 type Author = Set<members::author>;
18151815+ type Value = S::Value;
18161816+ type IndexedAt = S::IndexedAt;
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 Cid = S::Cid;
18231823+ type Uri = S::Uri;
18241824+ type Author = S::Author;
18251825+ type Value = Set<members::value>;
18261826 type IndexedAt = S::IndexedAt;
18271827 }
18281828 ///State transition - sets the `indexed_at` field to Set
···18311831 impl<S: State> State for SetIndexedAt<S> {
18321832 type Cid = S::Cid;
18331833 type Uri = S::Uri;
18341834- type Value = S::Value;
18351834 type Author = S::Author;
18351835+ type Value = S::Value;
18361836 type IndexedAt = Set<members::indexed_at>;
18371837 }
18381838 /// Marker types for field names
···18421842 pub struct cid(());
18431843 ///Marker type for the `uri` field
18441844 pub struct uri(());
18451845+ ///Marker type for the `author` field
18461846+ pub struct author(());
18451847 ///Marker type for the `value` field
18461848 pub struct value(());
18471847- ///Marker type for the `author` field
18481848- pub struct author(());
18491849 ///Marker type for the `indexed_at` field
18501850 pub struct indexed_at(());
18511851 }
···20942094 S: view_record_state::State,
20952095 S::Cid: view_record_state::IsSet,
20962096 S::Uri: view_record_state::IsSet,
20972097- S::Value: view_record_state::IsSet,
20982097 S::Author: view_record_state::IsSet,
20982098+ S::Value: view_record_state::IsSet,
20992099 S::IndexedAt: view_record_state::IsSet,
21002100{
21012101 /// Build the final struct
+13-13
crates/weaver-api/src/sh_weaver/embed/video.rs
···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> {
+86-86
crates/weaver-api/src/sh_weaver/graph.rs
···883883 }
884884 /// State trait tracking which required fields have been set
885885 pub trait State: sealed::Sealed {
886886- type Subject;
887886 type Uri;
887887+ type Subject;
888888 }
889889 /// Empty state - all required fields are unset
890890 pub struct Empty(());
891891 impl sealed::Sealed for Empty {}
892892 impl State for Empty {
893893- type Subject = Unset;
894893 type Uri = Unset;
895895- }
896896- ///State transition - sets the `subject` field to Set
897897- pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
898898- impl<S: State> sealed::Sealed for SetSubject<S> {}
899899- impl<S: State> State for SetSubject<S> {
900900- type Subject = Set<members::subject>;
901901- type Uri = S::Uri;
894894+ type Subject = Unset;
902895 }
903896 ///State transition - sets the `uri` field to Set
904897 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
905898 impl<S: State> sealed::Sealed for SetUri<S> {}
906899 impl<S: State> State for SetUri<S> {
907907- type Subject = S::Subject;
908900 type Uri = Set<members::uri>;
901901+ type Subject = S::Subject;
902902+ }
903903+ ///State transition - sets the `subject` field to Set
904904+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
905905+ impl<S: State> sealed::Sealed for SetSubject<S> {}
906906+ impl<S: State> State for SetSubject<S> {
907907+ type Uri = S::Uri;
908908+ type Subject = Set<members::subject>;
909909 }
910910 /// Marker types for field names
911911 #[allow(non_camel_case_types)]
912912 pub mod members {
913913- ///Marker type for the `subject` field
914914- pub struct subject(());
915913 ///Marker type for the `uri` field
916914 pub struct uri(());
915915+ ///Marker type for the `subject` field
916916+ pub struct subject(());
917917 }
918918}
919919···10061006impl<'a, S> ListItemViewBuilder<'a, S>
10071007where
10081008 S: list_item_view_state::State,
10091009- S::Subject: list_item_view_state::IsSet,
10101009 S::Uri: list_item_view_state::IsSet,
10101010+ S::Subject: list_item_view_state::IsSet,
10111011{
10121012 /// Build the final struct
10131013 pub fn build(self) -> ListItemView<'a> {
···12121212 }
12131213 /// State trait tracking which required fields have been set
12141214 pub trait State: sealed::Sealed {
12151215+ type ItemCount;
12161216+ type Creator;
12151217 type Name;
12161216- type Purpose;
12171218 type IndexedAt;
12181218- type Creator;
12191219 type Uri;
12201220- type ItemCount;
12201220+ type Purpose;
12211221 type Cid;
12221222 }
12231223 /// Empty state - all required fields are unset
12241224 pub struct Empty(());
12251225 impl sealed::Sealed for Empty {}
12261226 impl State for Empty {
12271227+ type ItemCount = Unset;
12281228+ type Creator = Unset;
12271229 type Name = Unset;
12281228- type Purpose = Unset;
12291230 type IndexedAt = Unset;
12301230- type Creator = Unset;
12311231 type Uri = Unset;
12321232- type ItemCount = Unset;
12321232+ type Purpose = Unset;
12331233 type Cid = Unset;
12341234 }
12351235- ///State transition - sets the `name` field to Set
12361236- pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
12371237- impl<S: State> sealed::Sealed for SetName<S> {}
12381238- impl<S: State> State for SetName<S> {
12391239- type Name = Set<members::name>;
12401240- type Purpose = S::Purpose;
12351235+ ///State transition - sets the `item_count` field to Set
12361236+ pub struct SetItemCount<S: State = Empty>(PhantomData<fn() -> S>);
12371237+ impl<S: State> sealed::Sealed for SetItemCount<S> {}
12381238+ impl<S: State> State for SetItemCount<S> {
12391239+ type ItemCount = Set<members::item_count>;
12401240+ type Creator = S::Creator;
12411241+ type Name = S::Name;
12411242 type IndexedAt = S::IndexedAt;
12421242- type Creator = S::Creator;
12431243 type Uri = S::Uri;
12441244- type ItemCount = S::ItemCount;
12441244+ type Purpose = S::Purpose;
12451245 type Cid = S::Cid;
12461246 }
12471247- ///State transition - sets the `purpose` field to Set
12481248- pub struct SetPurpose<S: State = Empty>(PhantomData<fn() -> S>);
12491249- impl<S: State> sealed::Sealed for SetPurpose<S> {}
12501250- impl<S: State> State for SetPurpose<S> {
12471247+ ///State transition - sets the `creator` field to Set
12481248+ pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
12491249+ impl<S: State> sealed::Sealed for SetCreator<S> {}
12501250+ impl<S: State> State for SetCreator<S> {
12511251+ type ItemCount = S::ItemCount;
12521252+ type Creator = Set<members::creator>;
12511253 type Name = S::Name;
12521252- type Purpose = Set<members::purpose>;
12531254 type IndexedAt = S::IndexedAt;
12541254- type Creator = S::Creator;
12551255 type Uri = S::Uri;
12561256+ type Purpose = S::Purpose;
12571257+ type Cid = S::Cid;
12581258+ }
12591259+ ///State transition - sets the `name` field to Set
12601260+ pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
12611261+ impl<S: State> sealed::Sealed for SetName<S> {}
12621262+ impl<S: State> State for SetName<S> {
12561263 type ItemCount = S::ItemCount;
12641264+ type Creator = S::Creator;
12651265+ type Name = Set<members::name>;
12661266+ type IndexedAt = S::IndexedAt;
12671267+ type Uri = S::Uri;
12681268+ type Purpose = S::Purpose;
12571269 type Cid = S::Cid;
12581270 }
12591271 ///State transition - sets the `indexed_at` field to Set
12601272 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
12611273 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
12621274 impl<S: State> State for SetIndexedAt<S> {
12751275+ type ItemCount = S::ItemCount;
12761276+ type Creator = S::Creator;
12631277 type Name = S::Name;
12641264- type Purpose = S::Purpose;
12651278 type IndexedAt = Set<members::indexed_at>;
12661266- type Creator = S::Creator;
12671279 type Uri = S::Uri;
12681268- type ItemCount = S::ItemCount;
12691269- type Cid = S::Cid;
12701270- }
12711271- ///State transition - sets the `creator` field to Set
12721272- pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
12731273- impl<S: State> sealed::Sealed for SetCreator<S> {}
12741274- impl<S: State> State for SetCreator<S> {
12751275- type Name = S::Name;
12761280 type Purpose = S::Purpose;
12771277- type IndexedAt = S::IndexedAt;
12781278- type Creator = Set<members::creator>;
12791279- type Uri = S::Uri;
12801280- type ItemCount = S::ItemCount;
12811281 type Cid = S::Cid;
12821282 }
12831283 ///State transition - sets the `uri` field to Set
12841284 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
12851285 impl<S: State> sealed::Sealed for SetUri<S> {}
12861286 impl<S: State> State for SetUri<S> {
12871287+ type ItemCount = S::ItemCount;
12881288+ type Creator = S::Creator;
12871289 type Name = S::Name;
12881288- type Purpose = S::Purpose;
12891290 type IndexedAt = S::IndexedAt;
12901290- type Creator = S::Creator;
12911291 type Uri = Set<members::uri>;
12921292- type ItemCount = S::ItemCount;
12921292+ type Purpose = S::Purpose;
12931293 type Cid = S::Cid;
12941294 }
12951295- ///State transition - sets the `item_count` field to Set
12961296- pub struct SetItemCount<S: State = Empty>(PhantomData<fn() -> S>);
12971297- impl<S: State> sealed::Sealed for SetItemCount<S> {}
12981298- impl<S: State> State for SetItemCount<S> {
12951295+ ///State transition - sets the `purpose` field to Set
12961296+ pub struct SetPurpose<S: State = Empty>(PhantomData<fn() -> S>);
12971297+ impl<S: State> sealed::Sealed for SetPurpose<S> {}
12981298+ impl<S: State> State for SetPurpose<S> {
12991299+ type ItemCount = S::ItemCount;
13001300+ type Creator = S::Creator;
12991301 type Name = S::Name;
13001300- type Purpose = S::Purpose;
13011302 type IndexedAt = S::IndexedAt;
13021302- type Creator = S::Creator;
13031303 type Uri = S::Uri;
13041304- type ItemCount = Set<members::item_count>;
13041304+ type Purpose = Set<members::purpose>;
13051305 type Cid = S::Cid;
13061306 }
13071307 ///State transition - sets the `cid` field to Set
13081308 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
13091309 impl<S: State> sealed::Sealed for SetCid<S> {}
13101310 impl<S: State> State for SetCid<S> {
13111311+ type ItemCount = S::ItemCount;
13121312+ type Creator = S::Creator;
13111313 type Name = S::Name;
13121312- type Purpose = S::Purpose;
13131314 type IndexedAt = S::IndexedAt;
13141314- type Creator = S::Creator;
13151315 type Uri = S::Uri;
13161316- type ItemCount = S::ItemCount;
13161316+ type Purpose = S::Purpose;
13171317 type Cid = Set<members::cid>;
13181318 }
13191319 /// Marker types for field names
13201320 #[allow(non_camel_case_types)]
13211321 pub mod members {
13221322+ ///Marker type for the `item_count` field
13231323+ pub struct item_count(());
13241324+ ///Marker type for the `creator` field
13251325+ pub struct creator(());
13221326 ///Marker type for the `name` field
13231327 pub struct name(());
13241324- ///Marker type for the `purpose` field
13251325- pub struct purpose(());
13261328 ///Marker type for the `indexed_at` field
13271329 pub struct indexed_at(());
13281328- ///Marker type for the `creator` field
13291329- pub struct creator(());
13301330 ///Marker type for the `uri` field
13311331 pub struct uri(());
13321332- ///Marker type for the `item_count` field
13331333- pub struct item_count(());
13321332+ ///Marker type for the `purpose` field
13331333+ pub struct purpose(());
13341334 ///Marker type for the `cid` field
13351335 pub struct cid(());
13361336 }
···15761576impl<'a, S> ListViewBuilder<'a, S>
15771577where
15781578 S: list_view_state::State,
15791579+ S::ItemCount: list_view_state::IsSet,
15801580+ S::Creator: list_view_state::IsSet,
15791581 S::Name: list_view_state::IsSet,
15801580- S::Purpose: list_view_state::IsSet,
15811582 S::IndexedAt: list_view_state::IsSet,
15821582- S::Creator: list_view_state::IsSet,
15831583 S::Uri: list_view_state::IsSet,
15841584- S::ItemCount: list_view_state::IsSet,
15841584+ S::Purpose: list_view_state::IsSet,
15851585 S::Cid: list_view_state::IsSet,
15861586{
15871587 /// Build the final struct
···19531953 /// State trait tracking which required fields have been set
19541954 pub trait State: sealed::Sealed {
19551955 type Tag;
19561956- type Uri;
19571956 type CreatedAt;
19581957 type AppliedBy;
19581958+ type Uri;
19591959 }
19601960 /// Empty state - all required fields are unset
19611961 pub struct Empty(());
19621962 impl sealed::Sealed for Empty {}
19631963 impl State for Empty {
19641964 type Tag = Unset;
19651965- type Uri = Unset;
19661965 type CreatedAt = Unset;
19671966 type AppliedBy = Unset;
19671967+ type Uri = Unset;
19681968 }
19691969 ///State transition - sets the `tag` field to Set
19701970 pub struct SetTag<S: State = Empty>(PhantomData<fn() -> S>);
19711971 impl<S: State> sealed::Sealed for SetTag<S> {}
19721972 impl<S: State> State for SetTag<S> {
19731973 type Tag = Set<members::tag>;
19741974- type Uri = S::Uri;
19751974 type CreatedAt = S::CreatedAt;
19761975 type AppliedBy = S::AppliedBy;
19771977- }
19781978- ///State transition - sets the `uri` field to Set
19791979- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
19801980- impl<S: State> sealed::Sealed for SetUri<S> {}
19811981- impl<S: State> State for SetUri<S> {
19821982- type Tag = S::Tag;
19831983- type Uri = Set<members::uri>;
19841984- type CreatedAt = S::CreatedAt;
19851985- type AppliedBy = S::AppliedBy;
19761976+ type Uri = S::Uri;
19861977 }
19871978 ///State transition - sets the `created_at` field to Set
19881979 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
19891980 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
19901981 impl<S: State> State for SetCreatedAt<S> {
19911982 type Tag = S::Tag;
19921992- type Uri = S::Uri;
19931983 type CreatedAt = Set<members::created_at>;
19941984 type AppliedBy = S::AppliedBy;
19851985+ type Uri = S::Uri;
19951986 }
19961987 ///State transition - sets the `applied_by` field to Set
19971988 pub struct SetAppliedBy<S: State = Empty>(PhantomData<fn() -> S>);
19981989 impl<S: State> sealed::Sealed for SetAppliedBy<S> {}
19991990 impl<S: State> State for SetAppliedBy<S> {
20001991 type Tag = S::Tag;
19921992+ type CreatedAt = S::CreatedAt;
19931993+ type AppliedBy = Set<members::applied_by>;
20011994 type Uri = S::Uri;
19951995+ }
19961996+ ///State transition - sets the `uri` field to Set
19971997+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
19981998+ impl<S: State> sealed::Sealed for SetUri<S> {}
19991999+ impl<S: State> State for SetUri<S> {
20002000+ type Tag = S::Tag;
20022001 type CreatedAt = S::CreatedAt;
20032003- type AppliedBy = Set<members::applied_by>;
20022002+ type AppliedBy = S::AppliedBy;
20032003+ type Uri = Set<members::uri>;
20042004 }
20052005 /// Marker types for field names
20062006 #[allow(non_camel_case_types)]
20072007 pub mod members {
20082008 ///Marker type for the `tag` field
20092009 pub struct tag(());
20102010- ///Marker type for the `uri` field
20112011- pub struct uri(());
20122010 ///Marker type for the `created_at` field
20132011 pub struct created_at(());
20142012 ///Marker type for the `applied_by` field
20152013 pub struct applied_by(());
20142014+ ///Marker type for the `uri` field
20152015+ pub struct uri(());
20162016 }
20172017}
20182018···21262126where
21272127 S: tag_application_view_state::State,
21282128 S::Tag: tag_application_view_state::IsSet,
21292129- S::Uri: tag_application_view_state::IsSet,
21302129 S::CreatedAt: tag_application_view_state::IsSet,
21312130 S::AppliedBy: tag_application_view_state::IsSet,
21312131+ S::Uri: tag_application_view_state::IsSet,
21322132{
21332133 /// Build the final struct
21342134 pub fn build(self) -> TagApplicationView<'a> {
+13-13
crates/weaver-api/src/sh_weaver/graph/bookmark.rs
···3838 }
3939 /// State trait tracking which required fields have been set
4040 pub trait State: sealed::Sealed {
4141- type Subject;
4241 type CreatedAt;
4242+ type Subject;
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;
4948 type CreatedAt = Unset;
5050- }
5151- ///State transition - sets the `subject` field to Set
5252- pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
5353- impl<S: State> sealed::Sealed for SetSubject<S> {}
5454- impl<S: State> State for SetSubject<S> {
5555- type Subject = Set<members::subject>;
5656- type CreatedAt = S::CreatedAt;
4949+ type Subject = Unset;
5750 }
5851 ///State transition - sets the `created_at` field to Set
5952 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
6053 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
6154 impl<S: State> State for SetCreatedAt<S> {
6262- type Subject = S::Subject;
6355 type CreatedAt = Set<members::created_at>;
5656+ type Subject = S::Subject;
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 CreatedAt = S::CreatedAt;
6363+ type Subject = Set<members::subject>;
6464 }
6565 /// Marker types for field names
6666 #[allow(non_camel_case_types)]
6767 pub mod members {
6868- ///Marker type for the `subject` field
6969- pub struct subject(());
7068 ///Marker type for the `created_at` field
7169 pub struct created_at(());
7070+ ///Marker type for the `subject` field
7171+ pub struct subject(());
7272 }
7373}
7474···158158impl<'a, S> BookmarkBuilder<'a, S>
159159where
160160 S: bookmark_state::State,
161161- S::Subject: bookmark_state::IsSet,
162161 S::CreatedAt: bookmark_state::IsSet,
162162+ S::Subject: bookmark_state::IsSet,
163163{
164164 /// Build the final struct
165165 pub fn build(self) -> Bookmark<'a> {
+24-24
crates/weaver-api/src/sh_weaver/graph/list.rs
···129129 }
130130 /// State trait tracking which required fields have been set
131131 pub trait State: sealed::Sealed {
132132- type Name;
133133- type Purpose;
134132 type CreatedAt;
133133+ type Purpose;
134134+ type Name;
135135 }
136136 /// Empty state - all required fields are unset
137137 pub struct Empty(());
138138 impl sealed::Sealed for Empty {}
139139 impl State for Empty {
140140+ type CreatedAt = Unset;
141141+ type Purpose = Unset;
140142 type Name = Unset;
141141- type Purpose = Unset;
142142- type CreatedAt = Unset;
143143 }
144144- ///State transition - sets the `name` field to Set
145145- pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
146146- impl<S: State> sealed::Sealed for SetName<S> {}
147147- impl<S: State> State for SetName<S> {
148148- type Name = Set<members::name>;
144144+ ///State transition - sets the `created_at` field to Set
145145+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
146146+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
147147+ impl<S: State> State for SetCreatedAt<S> {
148148+ type CreatedAt = Set<members::created_at>;
149149 type Purpose = S::Purpose;
150150- type CreatedAt = S::CreatedAt;
150150+ type Name = S::Name;
151151 }
152152 ///State transition - sets the `purpose` field to Set
153153 pub struct SetPurpose<S: State = Empty>(PhantomData<fn() -> S>);
154154 impl<S: State> sealed::Sealed for SetPurpose<S> {}
155155 impl<S: State> State for SetPurpose<S> {
156156- type Name = S::Name;
157157- type Purpose = Set<members::purpose>;
158156 type CreatedAt = S::CreatedAt;
157157+ type Purpose = Set<members::purpose>;
158158+ type Name = S::Name;
159159 }
160160- ///State transition - sets the `created_at` field to Set
161161- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
162162- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
163163- impl<S: State> State for SetCreatedAt<S> {
164164- type Name = S::Name;
160160+ ///State transition - sets the `name` field to Set
161161+ pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
162162+ impl<S: State> sealed::Sealed for SetName<S> {}
163163+ impl<S: State> State for SetName<S> {
164164+ type CreatedAt = S::CreatedAt;
165165 type Purpose = S::Purpose;
166166- type CreatedAt = Set<members::created_at>;
166166+ type Name = Set<members::name>;
167167 }
168168 /// Marker types for field names
169169 #[allow(non_camel_case_types)]
170170 pub mod members {
171171+ ///Marker type for the `created_at` field
172172+ pub struct created_at(());
173173+ ///Marker type for the `purpose` field
174174+ pub struct purpose(());
171175 ///Marker type for the `name` field
172176 pub struct name(());
173173- ///Marker type for the `purpose` field
174174- pub struct purpose(());
175175- ///Marker type for the `created_at` field
176176- pub struct created_at(());
177177 }
178178}
179179···306306impl<'a, S> ListBuilder<'a, S>
307307where
308308 S: list_state::State,
309309- S::Name: list_state::IsSet,
310310- S::Purpose: list_state::IsSet,
311309 S::CreatedAt: list_state::IsSet,
310310+ S::Purpose: list_state::IsSet,
311311+ S::Name: list_state::IsSet,
312312{
313313 /// Build the final struct
314314 pub fn build(self) -> List<'a> {
+15-15
crates/weaver-api/src/sh_weaver/graph/listitem.rs
···3737 }
3838 /// State trait tracking which required fields have been set
3939 pub trait State: sealed::Sealed {
4040+ type Subject;
4041 type CreatedAt;
4142 type List;
4242- type Subject;
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;
4849 type CreatedAt = Unset;
4950 type List = Unset;
5050- type Subject = 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 CreatedAt = S::CreatedAt;
5858+ type List = S::List;
5159 }
5260 ///State transition - sets the `created_at` field to Set
5361 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
5462 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
5563 impl<S: State> State for SetCreatedAt<S> {
6464+ type Subject = S::Subject;
5665 type CreatedAt = Set<members::created_at>;
5766 type List = S::List;
5858- type Subject = S::Subject;
5967 }
6068 ///State transition - sets the `list` field to Set
6169 pub struct SetList<S: State = Empty>(PhantomData<fn() -> S>);
6270 impl<S: State> sealed::Sealed for SetList<S> {}
6371 impl<S: State> State for SetList<S> {
6464- type CreatedAt = S::CreatedAt;
6565- type List = Set<members::list>;
6672 type Subject = S::Subject;
6767- }
6868- ///State transition - sets the `subject` field to Set
6969- pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
7070- impl<S: State> sealed::Sealed for SetSubject<S> {}
7171- impl<S: State> State for SetSubject<S> {
7273 type CreatedAt = S::CreatedAt;
7373- type List = S::List;
7474- type Subject = Set<members::subject>;
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(());
7981 ///Marker type for the `created_at` field
8082 pub struct created_at(());
8183 ///Marker type for the `list` field
8284 pub struct list(());
8383- ///Marker type for the `subject` field
8484- pub struct subject(());
8585 }
8686}
8787···174174impl<'a, S> ListitemBuilder<'a, S>
175175where
176176 S: listitem_state::State,
177177+ S::Subject: listitem_state::IsSet,
177178 S::CreatedAt: listitem_state::IsSet,
178179 S::List: listitem_state::IsSet,
179179- S::Subject: 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 Notebook;
3837 type CreatedAt;
3838+ type Notebook;
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 Notebook = Unset;
4544 type CreatedAt = Unset;
4646- }
4747- ///State transition - sets the `notebook` field to Set
4848- pub struct SetNotebook<S: State = Empty>(PhantomData<fn() -> S>);
4949- impl<S: State> sealed::Sealed for SetNotebook<S> {}
5050- impl<S: State> State for SetNotebook<S> {
5151- type Notebook = Set<members::notebook>;
5252- type CreatedAt = S::CreatedAt;
4545+ type Notebook = 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 Notebook = S::Notebook;
5951 type CreatedAt = Set<members::created_at>;
5252+ type Notebook = S::Notebook;
5353+ }
5454+ ///State transition - sets the `notebook` field to Set
5555+ pub struct SetNotebook<S: State = Empty>(PhantomData<fn() -> S>);
5656+ impl<S: State> sealed::Sealed for SetNotebook<S> {}
5757+ impl<S: State> State for SetNotebook<S> {
5858+ type CreatedAt = S::CreatedAt;
5959+ type Notebook = Set<members::notebook>;
6060 }
6161 /// Marker types for field names
6262 #[allow(non_camel_case_types)]
6363 pub mod members {
6464- ///Marker type for the `notebook` field
6565- pub struct notebook(());
6664 ///Marker type for the `created_at` field
6765 pub struct created_at(());
6666+ ///Marker type for the `notebook` field
6767+ pub struct notebook(());
6868 }
6969}
7070···137137impl<'a, S> SubscribeBuilder<'a, S>
138138where
139139 S: subscribe_state::State,
140140- S::Notebook: subscribe_state::IsSet,
141140 S::CreatedAt: subscribe_state::IsSet,
141141+ S::Notebook: subscribe_state::IsSet,
142142{
143143 /// Build the final struct
144144 pub fn build(self) -> Subscribe<'a> {
+15-15
crates/weaver-api/src/sh_weaver/graph/tag.rs
···3737 }
3838 /// State trait tracking which required fields have been set
3939 pub trait State: sealed::Sealed {
4040- type Tag;
4140 type Subject;
4241 type CreatedAt;
4242+ type Tag;
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 Tag = Unset;
4948 type Subject = Unset;
5049 type CreatedAt = Unset;
5151- }
5252- ///State transition - sets the `tag` field to Set
5353- pub struct SetTag<S: State = Empty>(PhantomData<fn() -> S>);
5454- impl<S: State> sealed::Sealed for SetTag<S> {}
5555- impl<S: State> State for SetTag<S> {
5656- type Tag = Set<members::tag>;
5757- type Subject = S::Subject;
5858- type CreatedAt = S::CreatedAt;
5050+ type Tag = Unset;
5951 }
6052 ///State transition - sets the `subject` field to Set
6153 pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
6254 impl<S: State> sealed::Sealed for SetSubject<S> {}
6355 impl<S: State> State for SetSubject<S> {
6464- type Tag = S::Tag;
6556 type Subject = Set<members::subject>;
6657 type CreatedAt = S::CreatedAt;
5858+ type Tag = S::Tag;
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> {
7272- type Tag = S::Tag;
7364 type Subject = S::Subject;
7465 type CreatedAt = Set<members::created_at>;
6666+ type Tag = S::Tag;
6767+ }
6868+ ///State transition - sets the `tag` field to Set
6969+ pub struct SetTag<S: State = Empty>(PhantomData<fn() -> S>);
7070+ impl<S: State> sealed::Sealed for SetTag<S> {}
7171+ impl<S: State> State for SetTag<S> {
7272+ type Subject = S::Subject;
7373+ type CreatedAt = S::CreatedAt;
7474+ type Tag = Set<members::tag>;
7575 }
7676 /// Marker types for field names
7777 #[allow(non_camel_case_types)]
7878 pub mod members {
7979- ///Marker type for the `tag` field
8080- pub struct tag(());
8179 ///Marker type for the `subject` field
8280 pub struct subject(());
8381 ///Marker type for the `created_at` field
8482 pub struct created_at(());
8383+ ///Marker type for the `tag` field
8484+ pub struct tag(());
8585 }
8686}
8787···174174impl<'a, S> TagBuilder<'a, S>
175175where
176176 S: tag_state::State,
177177- S::Tag: tag_state::IsSet,
178177 S::Subject: tag_state::IsSet,
179178 S::CreatedAt: tag_state::IsSet,
179179+ S::Tag: tag_state::IsSet,
180180{
181181 /// Build the final struct
182182 pub fn build(self) -> Tag<'a> {
+272-272
crates/weaver-api/src/sh_weaver/notebook.rs
···21742174 }
21752175 /// State trait tracking which required fields have been set
21762176 pub trait State: sealed::Sealed {
21772177- type Index;
21782177 type Entry;
21782178+ type Index;
21792179 }
21802180 /// Empty state - all required fields are unset
21812181 pub struct Empty(());
21822182 impl sealed::Sealed for Empty {}
21832183 impl State for Empty {
21842184+ type Entry = Unset;
21842185 type Index = Unset;
21852185- type Entry = Unset;
21862186- }
21872187- ///State transition - sets the `index` field to Set
21882188- pub struct SetIndex<S: State = Empty>(PhantomData<fn() -> S>);
21892189- impl<S: State> sealed::Sealed for SetIndex<S> {}
21902190- impl<S: State> State for SetIndex<S> {
21912191- type Index = Set<members::index>;
21922192- type Entry = S::Entry;
21932186 }
21942187 ///State transition - sets the `entry` field to Set
21952188 pub struct SetEntry<S: State = Empty>(PhantomData<fn() -> S>);
21962189 impl<S: State> sealed::Sealed for SetEntry<S> {}
21972190 impl<S: State> State for SetEntry<S> {
21982198- type Index = S::Index;
21992191 type Entry = Set<members::entry>;
21922192+ type Index = S::Index;
21932193+ }
21942194+ ///State transition - sets the `index` field to Set
21952195+ pub struct SetIndex<S: State = Empty>(PhantomData<fn() -> S>);
21962196+ impl<S: State> sealed::Sealed for SetIndex<S> {}
21972197+ impl<S: State> State for SetIndex<S> {
21982198+ type Entry = S::Entry;
21992199+ type Index = Set<members::index>;
22002200 }
22012201 /// Marker types for field names
22022202 #[allow(non_camel_case_types)]
22032203 pub mod members {
22042204+ ///Marker type for the `entry` field
22052205+ pub struct entry(());
22042206 ///Marker type for the `index` field
22052207 pub struct index(());
22062206- ///Marker type for the `entry` field
22072207- pub struct entry(());
22082208 }
22092209}
22102210···23172317impl<'a, S> BookEntryViewBuilder<'a, S>
23182318where
23192319 S: book_entry_view_state::State,
23202320- S::Index: book_entry_view_state::IsSet,
23212320 S::Entry: book_entry_view_state::IsSet,
23212321+ S::Index: book_entry_view_state::IsSet,
23222322{
23232323 /// Build the final struct
23242324 pub fn build(self) -> BookEntryView<'a> {
···23992399 }
24002400 /// State trait tracking which required fields have been set
24012401 pub trait State: sealed::Sealed {
24022402- type Index;
24032402 type Entry;
24032403+ type Index;
24042404 }
24052405 /// Empty state - all required fields are unset
24062406 pub struct Empty(());
24072407 impl sealed::Sealed for Empty {}
24082408 impl State for Empty {
24092409- type Index = Unset;
24102409 type Entry = Unset;
24112411- }
24122412- ///State transition - sets the `index` field to Set
24132413- pub struct SetIndex<S: State = Empty>(PhantomData<fn() -> S>);
24142414- impl<S: State> sealed::Sealed for SetIndex<S> {}
24152415- impl<S: State> State for SetIndex<S> {
24162416- type Index = Set<members::index>;
24172417- type Entry = S::Entry;
24102410+ type Index = Unset;
24182411 }
24192412 ///State transition - sets the `entry` field to Set
24202413 pub struct SetEntry<S: State = Empty>(PhantomData<fn() -> S>);
24212414 impl<S: State> sealed::Sealed for SetEntry<S> {}
24222415 impl<S: State> State for SetEntry<S> {
24232423- type Index = S::Index;
24242416 type Entry = Set<members::entry>;
24172417+ type Index = S::Index;
24182418+ }
24192419+ ///State transition - sets the `index` field to Set
24202420+ pub struct SetIndex<S: State = Empty>(PhantomData<fn() -> S>);
24212421+ impl<S: State> sealed::Sealed for SetIndex<S> {}
24222422+ impl<S: State> State for SetIndex<S> {
24232423+ type Entry = S::Entry;
24242424+ type Index = Set<members::index>;
24252425 }
24262426 /// Marker types for field names
24272427 #[allow(non_camel_case_types)]
24282428 pub mod members {
24292429+ ///Marker type for the `entry` field
24302430+ pub struct entry(());
24292431 ///Marker type for the `index` field
24302432 pub struct index(());
24312431- ///Marker type for the `entry` field
24322432- pub struct entry(());
24332433 }
24342434}
24352435···25422542impl<'a, S> ChapterEntryViewBuilder<'a, S>
25432543where
25442544 S: chapter_entry_view_state::State,
25452545- S::Index: chapter_entry_view_state::IsSet,
25462545 S::Entry: chapter_entry_view_state::IsSet,
25462546+ S::Index: chapter_entry_view_state::IsSet,
25472547{
25482548 /// Build the final struct
25492549 pub fn build(self) -> ChapterEntryView<'a> {
···26342634 }
26352635 /// State trait tracking which required fields have been set
26362636 pub trait State: sealed::Sealed {
26372637- type Cid;
26382638- type Authors;
26392637 type Record;
26382638+ type Notebook;
26392639+ type Cid;
26402640 type IndexedAt;
26412641+ type Authors;
26412642 type Uri;
26422642- type Notebook;
26432643 }
26442644 /// Empty state - all required fields are unset
26452645 pub struct Empty(());
26462646 impl sealed::Sealed for Empty {}
26472647 impl State for Empty {
26482648- type Cid = Unset;
26492649- type Authors = Unset;
26502648 type Record = Unset;
26492649+ type Notebook = Unset;
26502650+ type Cid = Unset;
26512651 type IndexedAt = Unset;
26522652+ type Authors = Unset;
26522653 type Uri = Unset;
26532653- type Notebook = Unset;
26542654- }
26552655- ///State transition - sets the `cid` field to Set
26562656- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
26572657- impl<S: State> sealed::Sealed for SetCid<S> {}
26582658- impl<S: State> State for SetCid<S> {
26592659- type Cid = Set<members::cid>;
26602660- type Authors = S::Authors;
26612661- type Record = S::Record;
26622662- type IndexedAt = S::IndexedAt;
26632663- type Uri = S::Uri;
26642664- type Notebook = S::Notebook;
26652665- }
26662666- ///State transition - sets the `authors` field to Set
26672667- pub struct SetAuthors<S: State = Empty>(PhantomData<fn() -> S>);
26682668- impl<S: State> sealed::Sealed for SetAuthors<S> {}
26692669- impl<S: State> State for SetAuthors<S> {
26702670- type Cid = S::Cid;
26712671- type Authors = Set<members::authors>;
26722672- type Record = S::Record;
26732673- type IndexedAt = S::IndexedAt;
26742674- type Uri = S::Uri;
26752675- type Notebook = S::Notebook;
26762654 }
26772655 ///State transition - sets the `record` field to Set
26782656 pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
26792657 impl<S: State> sealed::Sealed for SetRecord<S> {}
26802658 impl<S: State> State for SetRecord<S> {
26592659+ type Record = Set<members::record>;
26602660+ type Notebook = S::Notebook;
26812661 type Cid = S::Cid;
26622662+ type IndexedAt = S::IndexedAt;
26822663 type Authors = S::Authors;
26832683- type Record = Set<members::record>;
26642664+ type Uri = S::Uri;
26652665+ }
26662666+ ///State transition - sets the `notebook` field to Set
26672667+ pub struct SetNotebook<S: State = Empty>(PhantomData<fn() -> S>);
26682668+ impl<S: State> sealed::Sealed for SetNotebook<S> {}
26692669+ impl<S: State> State for SetNotebook<S> {
26702670+ type Record = S::Record;
26712671+ type Notebook = Set<members::notebook>;
26722672+ type Cid = S::Cid;
26842673 type IndexedAt = S::IndexedAt;
26742674+ type Authors = S::Authors;
26852675 type Uri = S::Uri;
26762676+ }
26772677+ ///State transition - sets the `cid` field to Set
26782678+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
26792679+ impl<S: State> sealed::Sealed for SetCid<S> {}
26802680+ impl<S: State> State for SetCid<S> {
26812681+ type Record = S::Record;
26862682 type Notebook = S::Notebook;
26832683+ type Cid = Set<members::cid>;
26842684+ type IndexedAt = S::IndexedAt;
26852685+ type Authors = S::Authors;
26862686+ type Uri = S::Uri;
26872687 }
26882688 ///State transition - sets the `indexed_at` field to Set
26892689 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
26902690 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
26912691 impl<S: State> State for SetIndexedAt<S> {
26922692+ type Record = S::Record;
26932693+ type Notebook = S::Notebook;
26922694 type Cid = S::Cid;
26932693- type Authors = S::Authors;
26942694- type Record = S::Record;
26952695 type IndexedAt = Set<members::indexed_at>;
26962696+ type Authors = S::Authors;
26962697 type Uri = S::Uri;
26982698+ }
26992699+ ///State transition - sets the `authors` field to Set
27002700+ pub struct SetAuthors<S: State = Empty>(PhantomData<fn() -> S>);
27012701+ impl<S: State> sealed::Sealed for SetAuthors<S> {}
27022702+ impl<S: State> State for SetAuthors<S> {
27032703+ type Record = S::Record;
26972704 type Notebook = S::Notebook;
27052705+ type Cid = S::Cid;
27062706+ type IndexedAt = S::IndexedAt;
27072707+ type Authors = Set<members::authors>;
27082708+ type Uri = S::Uri;
26982709 }
26992710 ///State transition - sets the `uri` field to Set
27002711 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
27012712 impl<S: State> sealed::Sealed for SetUri<S> {}
27022713 impl<S: State> State for SetUri<S> {
27032703- type Cid = S::Cid;
27042704- type Authors = S::Authors;
27052714 type Record = S::Record;
27062706- type IndexedAt = S::IndexedAt;
27072707- type Uri = Set<members::uri>;
27082715 type Notebook = S::Notebook;
27092709- }
27102710- ///State transition - sets the `notebook` field to Set
27112711- pub struct SetNotebook<S: State = Empty>(PhantomData<fn() -> S>);
27122712- impl<S: State> sealed::Sealed for SetNotebook<S> {}
27132713- impl<S: State> State for SetNotebook<S> {
27142716 type Cid = S::Cid;
27152715- type Authors = S::Authors;
27162716- type Record = S::Record;
27172717 type IndexedAt = S::IndexedAt;
27182718- type Uri = S::Uri;
27192719- type Notebook = Set<members::notebook>;
27182718+ type Authors = S::Authors;
27192719+ type Uri = Set<members::uri>;
27202720 }
27212721 /// Marker types for field names
27222722 #[allow(non_camel_case_types)]
27232723 pub mod members {
27242724- ///Marker type for the `cid` field
27252725- pub struct cid(());
27262726- ///Marker type for the `authors` field
27272727- pub struct authors(());
27282724 ///Marker type for the `record` field
27292725 pub struct record(());
27262726+ ///Marker type for the `notebook` field
27272727+ pub struct notebook(());
27282728+ ///Marker type for the `cid` field
27292729+ pub struct cid(());
27302730 ///Marker type for the `indexed_at` field
27312731 pub struct indexed_at(());
27322732+ ///Marker type for the `authors` field
27332733+ pub struct authors(());
27322734 ///Marker type for the `uri` field
27332735 pub struct uri(());
27342734- ///Marker type for the `notebook` field
27352735- pub struct notebook(());
27362736 }
27372737}
27382738···29492949impl<'a, S> ChapterViewBuilder<'a, S>
29502950where
29512951 S: chapter_view_state::State,
29522952- S::Cid: chapter_view_state::IsSet,
29532953- S::Authors: chapter_view_state::IsSet,
29542952 S::Record: chapter_view_state::IsSet,
29532953+ S::Notebook: chapter_view_state::IsSet,
29542954+ S::Cid: chapter_view_state::IsSet,
29552955 S::IndexedAt: chapter_view_state::IsSet,
29562956+ S::Authors: chapter_view_state::IsSet,
29562957 S::Uri: chapter_view_state::IsSet,
29572957- S::Notebook: chapter_view_state::IsSet,
29582958{
29592959 /// Build the final struct
29602960 pub fn build(self) -> ChapterView<'a> {
···33383338 }
33393339 /// State trait tracking which required fields have been set
33403340 pub trait State: sealed::Sealed {
33413341- type IndexedAt;
33423342- type Authors;
33433343- type Record;
33443341 type Uri;
33453342 type Cid;
33433343+ type Record;
33443344+ type IndexedAt;
33453345+ type Authors;
33463346 }
33473347 /// Empty state - all required fields are unset
33483348 pub struct Empty(());
33493349 impl sealed::Sealed for Empty {}
33503350 impl State for Empty {
33513351- type IndexedAt = Unset;
33523352- type Authors = Unset;
33533353- type Record = Unset;
33543351 type Uri = Unset;
33553352 type Cid = Unset;
33563356- }
33573357- ///State transition - sets the `indexed_at` field to Set
33583358- pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
33593359- impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
33603360- impl<S: State> State for SetIndexedAt<S> {
33613361- type IndexedAt = Set<members::indexed_at>;
33623362- type Authors = S::Authors;
33633363- type Record = S::Record;
33643364- type Uri = S::Uri;
33653365- type Cid = S::Cid;
33663366- }
33673367- ///State transition - sets the `authors` field to Set
33683368- pub struct SetAuthors<S: State = Empty>(PhantomData<fn() -> S>);
33693369- impl<S: State> sealed::Sealed for SetAuthors<S> {}
33703370- impl<S: State> State for SetAuthors<S> {
33713371- type IndexedAt = S::IndexedAt;
33723372- type Authors = Set<members::authors>;
33733373- type Record = S::Record;
33743374- type Uri = S::Uri;
33753375- type Cid = S::Cid;
33763376- }
33773377- ///State transition - sets the `record` field to Set
33783378- pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
33793379- impl<S: State> sealed::Sealed for SetRecord<S> {}
33803380- impl<S: State> State for SetRecord<S> {
33813381- type IndexedAt = S::IndexedAt;
33823382- type Authors = S::Authors;
33833383- type Record = Set<members::record>;
33843384- type Uri = S::Uri;
33853385- type Cid = S::Cid;
33533353+ type Record = Unset;
33543354+ type IndexedAt = Unset;
33553355+ type Authors = Unset;
33863356 }
33873357 ///State transition - sets the `uri` field to Set
33883358 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
33893359 impl<S: State> sealed::Sealed for SetUri<S> {}
33903360 impl<S: State> State for SetUri<S> {
33913391- type IndexedAt = S::IndexedAt;
33923392- type Authors = S::Authors;
33933393- type Record = S::Record;
33943361 type Uri = Set<members::uri>;
33953362 type Cid = S::Cid;
33633363+ type Record = S::Record;
33643364+ type IndexedAt = S::IndexedAt;
33653365+ type Authors = S::Authors;
33963366 }
33973367 ///State transition - sets the `cid` field to Set
33983368 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
33993369 impl<S: State> sealed::Sealed for SetCid<S> {}
34003370 impl<S: State> State for SetCid<S> {
33713371+ type Uri = S::Uri;
33723372+ type Cid = Set<members::cid>;
33733373+ type Record = S::Record;
34013374 type IndexedAt = S::IndexedAt;
34023375 type Authors = S::Authors;
33763376+ }
33773377+ ///State transition - sets the `record` field to Set
33783378+ pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
33793379+ impl<S: State> sealed::Sealed for SetRecord<S> {}
33803380+ impl<S: State> State for SetRecord<S> {
33813381+ type Uri = S::Uri;
33823382+ type Cid = S::Cid;
33833383+ type Record = Set<members::record>;
33843384+ type IndexedAt = S::IndexedAt;
33853385+ type Authors = S::Authors;
33863386+ }
33873387+ ///State transition - sets the `indexed_at` field to Set
33883388+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
33893389+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
33903390+ impl<S: State> State for SetIndexedAt<S> {
33913391+ type Uri = S::Uri;
33923392+ type Cid = S::Cid;
34033393 type Record = S::Record;
33943394+ type IndexedAt = Set<members::indexed_at>;
33953395+ type Authors = S::Authors;
33963396+ }
33973397+ ///State transition - sets the `authors` field to Set
33983398+ pub struct SetAuthors<S: State = Empty>(PhantomData<fn() -> S>);
33993399+ impl<S: State> sealed::Sealed for SetAuthors<S> {}
34003400+ impl<S: State> State for SetAuthors<S> {
34043401 type Uri = S::Uri;
34053405- type Cid = Set<members::cid>;
34023402+ type Cid = S::Cid;
34033403+ type Record = S::Record;
34043404+ type IndexedAt = S::IndexedAt;
34053405+ type Authors = Set<members::authors>;
34063406 }
34073407 /// Marker types for field names
34083408 #[allow(non_camel_case_types)]
34093409 pub mod members {
34103410- ///Marker type for the `indexed_at` field
34113411- pub struct indexed_at(());
34123412- ///Marker type for the `authors` field
34133413- pub struct authors(());
34143414- ///Marker type for the `record` field
34153415- pub struct record(());
34163410 ///Marker type for the `uri` field
34173411 pub struct uri(());
34183412 ///Marker type for the `cid` field
34193413 pub struct cid(());
34143414+ ///Marker type for the `record` field
34153415+ pub struct record(());
34163416+ ///Marker type for the `indexed_at` field
34173417+ pub struct indexed_at(());
34183418+ ///Marker type for the `authors` field
34193419+ pub struct authors(());
34203420 }
34213421}
34223422···37533753impl<'a, S> EntryViewBuilder<'a, S>
37543754where
37553755 S: entry_view_state::State,
37563756- S::IndexedAt: entry_view_state::IsSet,
37573757- S::Authors: entry_view_state::IsSet,
37583758- S::Record: entry_view_state::IsSet,
37593756 S::Uri: entry_view_state::IsSet,
37603757 S::Cid: entry_view_state::IsSet,
37583758+ S::Record: entry_view_state::IsSet,
37593759+ S::IndexedAt: entry_view_state::IsSet,
37603760+ S::Authors: entry_view_state::IsSet,
37613761{
37623762 /// Build the final struct
37633763 pub fn build(self) -> EntryView<'a> {
···40494049 }
40504050 /// State trait tracking which required fields have been set
40514051 pub trait State: sealed::Sealed {
40524052- type Uri;
40534052 type Title;
40534053+ type Uri;
40544054 }
40554055 /// Empty state - all required fields are unset
40564056 pub struct Empty(());
40574057 impl sealed::Sealed for Empty {}
40584058 impl State for Empty {
40594059- type Uri = Unset;
40604059 type Title = Unset;
40614061- }
40624062- ///State transition - sets the `uri` field to Set
40634063- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
40644064- impl<S: State> sealed::Sealed for SetUri<S> {}
40654065- impl<S: State> State for SetUri<S> {
40664066- type Uri = Set<members::uri>;
40674067- type Title = S::Title;
40604060+ type Uri = Unset;
40684061 }
40694062 ///State transition - sets the `title` field to Set
40704063 pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
40714064 impl<S: State> sealed::Sealed for SetTitle<S> {}
40724065 impl<S: State> State for SetTitle<S> {
40734073- type Uri = S::Uri;
40744066 type Title = Set<members::title>;
40674067+ type Uri = S::Uri;
40684068+ }
40694069+ ///State transition - sets the `uri` field to Set
40704070+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
40714071+ impl<S: State> sealed::Sealed for SetUri<S> {}
40724072+ impl<S: State> State for SetUri<S> {
40734073+ type Title = S::Title;
40744074+ type Uri = Set<members::uri>;
40754075 }
40764076 /// Marker types for field names
40774077 #[allow(non_camel_case_types)]
40784078 pub mod members {
40794079+ ///Marker type for the `title` field
40804080+ pub struct title(());
40794081 ///Marker type for the `uri` field
40804082 pub struct uri(());
40814081- ///Marker type for the `title` field
40824082- pub struct title(());
40834083 }
40844084}
40854085···41694169impl<'a, S> FeedNotebookContextBuilder<'a, S>
41704170where
41714171 S: feed_notebook_context_state::State,
41724172- S::Uri: feed_notebook_context_state::IsSet,
41734172 S::Title: feed_notebook_context_state::IsSet,
41734173+ S::Uri: feed_notebook_context_state::IsSet,
41744174{
41754175 /// Build the final struct
41764176 pub fn build(self) -> FeedNotebookContext<'a> {
···43094309 /// State trait tracking which required fields have been set
43104310 pub trait State: sealed::Sealed {
43114311 type Record;
43124312+ type IndexedAt;
43124313 type Cid;
43134313- type Uri;
43144314 type Authors;
43154315- type IndexedAt;
43154315+ type Uri;
43164316 }
43174317 /// Empty state - all required fields are unset
43184318 pub struct Empty(());
43194319 impl sealed::Sealed for Empty {}
43204320 impl State for Empty {
43214321 type Record = Unset;
43224322+ type IndexedAt = Unset;
43224323 type Cid = Unset;
43234323- type Uri = Unset;
43244324 type Authors = Unset;
43254325- type IndexedAt = Unset;
43254325+ type Uri = Unset;
43264326 }
43274327 ///State transition - sets the `record` field to Set
43284328 pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
43294329 impl<S: State> sealed::Sealed for SetRecord<S> {}
43304330 impl<S: State> State for SetRecord<S> {
43314331 type Record = Set<members::record>;
43324332+ type IndexedAt = S::IndexedAt;
43324333 type Cid = S::Cid;
43344334+ type Authors = S::Authors;
43334335 type Uri = S::Uri;
43364336+ }
43374337+ ///State transition - sets the `indexed_at` field to Set
43384338+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
43394339+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
43404340+ impl<S: State> State for SetIndexedAt<S> {
43414341+ type Record = S::Record;
43424342+ type IndexedAt = Set<members::indexed_at>;
43434343+ type Cid = S::Cid;
43344344 type Authors = S::Authors;
43354335- type IndexedAt = S::IndexedAt;
43454345+ type Uri = S::Uri;
43364346 }
43374347 ///State transition - sets the `cid` field to Set
43384348 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
43394349 impl<S: State> sealed::Sealed for SetCid<S> {}
43404350 impl<S: State> State for SetCid<S> {
43414351 type Record = S::Record;
43424342- type Cid = Set<members::cid>;
43434343- type Uri = S::Uri;
43444344- type Authors = S::Authors;
43454352 type IndexedAt = S::IndexedAt;
43464346- }
43474347- ///State transition - sets the `uri` field to Set
43484348- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
43494349- impl<S: State> sealed::Sealed for SetUri<S> {}
43504350- impl<S: State> State for SetUri<S> {
43514351- type Record = S::Record;
43524352- type Cid = S::Cid;
43534353- type Uri = Set<members::uri>;
43534353+ type Cid = Set<members::cid>;
43544354 type Authors = S::Authors;
43554355- type IndexedAt = S::IndexedAt;
43554355+ type Uri = S::Uri;
43564356 }
43574357 ///State transition - sets the `authors` field to Set
43584358 pub struct SetAuthors<S: State = Empty>(PhantomData<fn() -> S>);
43594359 impl<S: State> sealed::Sealed for SetAuthors<S> {}
43604360 impl<S: State> State for SetAuthors<S> {
43614361 type Record = S::Record;
43624362+ type IndexedAt = S::IndexedAt;
43624363 type Cid = S::Cid;
43634363- type Uri = S::Uri;
43644364 type Authors = Set<members::authors>;
43654365- type IndexedAt = S::IndexedAt;
43654365+ type Uri = S::Uri;
43664366 }
43674367- ///State transition - sets the `indexed_at` field to Set
43684368- pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
43694369- impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
43704370- impl<S: State> State for SetIndexedAt<S> {
43674367+ ///State transition - sets the `uri` field to Set
43684368+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
43694369+ impl<S: State> sealed::Sealed for SetUri<S> {}
43704370+ impl<S: State> State for SetUri<S> {
43714371 type Record = S::Record;
43724372+ type IndexedAt = S::IndexedAt;
43724373 type Cid = S::Cid;
43734373- type Uri = S::Uri;
43744374 type Authors = S::Authors;
43754375- type IndexedAt = Set<members::indexed_at>;
43754375+ type Uri = Set<members::uri>;
43764376 }
43774377 /// Marker types for field names
43784378 #[allow(non_camel_case_types)]
43794379 pub mod members {
43804380 ///Marker type for the `record` field
43814381 pub struct record(());
43824382+ ///Marker type for the `indexed_at` field
43834383+ pub struct indexed_at(());
43824384 ///Marker type for the `cid` field
43834385 pub struct cid(());
43844384- ///Marker type for the `uri` field
43854385- pub struct uri(());
43864386 ///Marker type for the `authors` field
43874387 pub struct authors(());
43884388- ///Marker type for the `indexed_at` field
43894389- pub struct indexed_at(());
43884388+ ///Marker type for the `uri` field
43894389+ pub struct uri(());
43904390 }
43914391}
43924392···47544754where
47554755 S: notebook_view_state::State,
47564756 S::Record: notebook_view_state::IsSet,
47574757+ S::IndexedAt: notebook_view_state::IsSet,
47574758 S::Cid: notebook_view_state::IsSet,
47584758- S::Uri: notebook_view_state::IsSet,
47594759 S::Authors: notebook_view_state::IsSet,
47604760- S::IndexedAt: notebook_view_state::IsSet,
47604760+ S::Uri: notebook_view_state::IsSet,
47614761{
47624762 /// Build the final struct
47634763 pub fn build(self) -> NotebookView<'a> {
···48724872 }
48734873 /// State trait tracking which required fields have been set
48744874 pub trait State: sealed::Sealed {
48754875+ type IndexedAt;
48754876 type Notebook;
48764877 type Uri;
48774877- type Record;
48784878 type Cid;
48794879- type IndexedAt;
48794879+ type Record;
48804880 }
48814881 /// Empty state - all required fields are unset
48824882 pub struct Empty(());
48834883 impl sealed::Sealed for Empty {}
48844884 impl State for Empty {
48854885+ type IndexedAt = Unset;
48854886 type Notebook = Unset;
48864887 type Uri = Unset;
48874887- type Record = Unset;
48884888 type Cid = Unset;
48894889- type IndexedAt = Unset;
48894889+ type Record = Unset;
48904890+ }
48914891+ ///State transition - sets the `indexed_at` field to Set
48924892+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
48934893+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
48944894+ impl<S: State> State for SetIndexedAt<S> {
48954895+ type IndexedAt = Set<members::indexed_at>;
48964896+ type Notebook = S::Notebook;
48974897+ type Uri = S::Uri;
48984898+ type Cid = S::Cid;
48994899+ type Record = S::Record;
48904900 }
48914901 ///State transition - sets the `notebook` field to Set
48924902 pub struct SetNotebook<S: State = Empty>(PhantomData<fn() -> S>);
48934903 impl<S: State> sealed::Sealed for SetNotebook<S> {}
48944904 impl<S: State> State for SetNotebook<S> {
49054905+ type IndexedAt = S::IndexedAt;
48954906 type Notebook = Set<members::notebook>;
48964907 type Uri = S::Uri;
48974897- type Record = S::Record;
48984908 type Cid = S::Cid;
48994899- type IndexedAt = S::IndexedAt;
49094909+ type Record = S::Record;
49004910 }
49014911 ///State transition - sets the `uri` field to Set
49024912 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
49034913 impl<S: State> sealed::Sealed for SetUri<S> {}
49044914 impl<S: State> State for SetUri<S> {
49054905- type Notebook = S::Notebook;
49064906- type Uri = Set<members::uri>;
49074907- type Record = S::Record;
49084908- type Cid = S::Cid;
49094915 type IndexedAt = S::IndexedAt;
49104910- }
49114911- ///State transition - sets the `record` field to Set
49124912- pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
49134913- impl<S: State> sealed::Sealed for SetRecord<S> {}
49144914- impl<S: State> State for SetRecord<S> {
49154916 type Notebook = S::Notebook;
49164916- type Uri = S::Uri;
49174917- type Record = Set<members::record>;
49174917+ type Uri = Set<members::uri>;
49184918 type Cid = S::Cid;
49194919- type IndexedAt = S::IndexedAt;
49194919+ type Record = S::Record;
49204920 }
49214921 ///State transition - sets the `cid` field to Set
49224922 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
49234923 impl<S: State> sealed::Sealed for SetCid<S> {}
49244924 impl<S: State> State for SetCid<S> {
49254925+ type IndexedAt = S::IndexedAt;
49254926 type Notebook = S::Notebook;
49264927 type Uri = S::Uri;
49284928+ type Cid = Set<members::cid>;
49274929 type Record = S::Record;
49284928- type Cid = Set<members::cid>;
49294929- type IndexedAt = S::IndexedAt;
49304930 }
49314931- ///State transition - sets the `indexed_at` field to Set
49324932- pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
49334933- impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
49344934- impl<S: State> State for SetIndexedAt<S> {
49314931+ ///State transition - sets the `record` field to Set
49324932+ pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
49334933+ impl<S: State> sealed::Sealed for SetRecord<S> {}
49344934+ impl<S: State> State for SetRecord<S> {
49354935+ type IndexedAt = S::IndexedAt;
49354936 type Notebook = S::Notebook;
49364937 type Uri = S::Uri;
49374937- type Record = S::Record;
49384938 type Cid = S::Cid;
49394939- type IndexedAt = Set<members::indexed_at>;
49394939+ type Record = Set<members::record>;
49404940 }
49414941 /// Marker types for field names
49424942 #[allow(non_camel_case_types)]
49434943 pub mod members {
49444944+ ///Marker type for the `indexed_at` field
49454945+ pub struct indexed_at(());
49444946 ///Marker type for the `notebook` field
49454947 pub struct notebook(());
49464948 ///Marker type for the `uri` field
49474949 pub struct uri(());
49504950+ ///Marker type for the `cid` field
49514951+ pub struct cid(());
49484952 ///Marker type for the `record` field
49494953 pub struct record(());
49504950- ///Marker type for the `cid` field
49514951- pub struct cid(());
49524952- ///Marker type for the `indexed_at` field
49534953- pub struct indexed_at(());
49544954 }
49554955}
49564956···51375137impl<'a, S> PageViewBuilder<'a, S>
51385138where
51395139 S: page_view_state::State,
51405140+ S::IndexedAt: page_view_state::IsSet,
51405141 S::Notebook: page_view_state::IsSet,
51415142 S::Uri: page_view_state::IsSet,
51425142- S::Record: page_view_state::IsSet,
51435143 S::Cid: page_view_state::IsSet,
51445144- S::IndexedAt: page_view_state::IsSet,
51445144+ S::Record: page_view_state::IsSet,
51455145{
51465146 /// Build the final struct
51475147 pub fn build(self) -> PageView<'a> {
···52335233 }
52345234 /// State trait tracking which required fields have been set
52355235 pub trait State: sealed::Sealed {
52365236- type GrantedAt;
52375237- type Scope;
52385236 type Did;
52375237+ type Scope;
52385238+ type GrantedAt;
52395239 type Source;
52405240 }
52415241 /// Empty state - all required fields are unset
52425242 pub struct Empty(());
52435243 impl sealed::Sealed for Empty {}
52445244 impl State for Empty {
52455245- type GrantedAt = Unset;
52465246- type Scope = Unset;
52475245 type Did = Unset;
52465246+ type Scope = Unset;
52475247+ type GrantedAt = Unset;
52485248 type Source = Unset;
52495249 }
52505250- ///State transition - sets the `granted_at` field to Set
52515251- pub struct SetGrantedAt<S: State = Empty>(PhantomData<fn() -> S>);
52525252- impl<S: State> sealed::Sealed for SetGrantedAt<S> {}
52535253- impl<S: State> State for SetGrantedAt<S> {
52545254- type GrantedAt = Set<members::granted_at>;
52505250+ ///State transition - sets the `did` field to Set
52515251+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
52525252+ impl<S: State> sealed::Sealed for SetDid<S> {}
52535253+ impl<S: State> State for SetDid<S> {
52545254+ type Did = Set<members::did>;
52555255 type Scope = S::Scope;
52565256- type Did = S::Did;
52565256+ type GrantedAt = S::GrantedAt;
52575257 type Source = S::Source;
52585258 }
52595259 ///State transition - sets the `scope` field to Set
52605260 pub struct SetScope<S: State = Empty>(PhantomData<fn() -> S>);
52615261 impl<S: State> sealed::Sealed for SetScope<S> {}
52625262 impl<S: State> State for SetScope<S> {
52635263- type GrantedAt = S::GrantedAt;
52645264- type Scope = Set<members::scope>;
52655263 type Did = S::Did;
52645264+ type Scope = Set<members::scope>;
52655265+ type GrantedAt = S::GrantedAt;
52665266 type Source = S::Source;
52675267 }
52685268- ///State transition - sets the `did` field to Set
52695269- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
52705270- impl<S: State> sealed::Sealed for SetDid<S> {}
52715271- impl<S: State> State for SetDid<S> {
52725272- type GrantedAt = S::GrantedAt;
52685268+ ///State transition - sets the `granted_at` field to Set
52695269+ pub struct SetGrantedAt<S: State = Empty>(PhantomData<fn() -> S>);
52705270+ impl<S: State> sealed::Sealed for SetGrantedAt<S> {}
52715271+ impl<S: State> State for SetGrantedAt<S> {
52725272+ type Did = S::Did;
52735273 type Scope = S::Scope;
52745274- type Did = Set<members::did>;
52745274+ type GrantedAt = Set<members::granted_at>;
52755275 type Source = S::Source;
52765276 }
52775277 ///State transition - sets the `source` field to Set
52785278 pub struct SetSource<S: State = Empty>(PhantomData<fn() -> S>);
52795279 impl<S: State> sealed::Sealed for SetSource<S> {}
52805280 impl<S: State> State for SetSource<S> {
52815281- type GrantedAt = S::GrantedAt;
52825282- type Scope = S::Scope;
52835281 type Did = S::Did;
52825282+ type Scope = S::Scope;
52835283+ type GrantedAt = S::GrantedAt;
52845284 type Source = Set<members::source>;
52855285 }
52865286 /// Marker types for field names
52875287 #[allow(non_camel_case_types)]
52885288 pub mod members {
52895289- ///Marker type for the `granted_at` field
52905290- pub struct granted_at(());
52915291- ///Marker type for the `scope` field
52925292- pub struct scope(());
52935289 ///Marker type for the `did` field
52945290 pub struct did(());
52915291+ ///Marker type for the `scope` field
52925292+ pub struct scope(());
52935293+ ///Marker type for the `granted_at` field
52945294+ pub struct granted_at(());
52955295 ///Marker type for the `source` field
52965296 pub struct source(());
52975297 }
···54065406impl<'a, S> PermissionGrantBuilder<'a, S>
54075407where
54085408 S: permission_grant_state::State,
54095409- S::GrantedAt: permission_grant_state::IsSet,
54105410- S::Scope: permission_grant_state::IsSet,
54115409 S::Did: permission_grant_state::IsSet,
54105410+ S::Scope: permission_grant_state::IsSet,
54115411+ S::GrantedAt: permission_grant_state::IsSet,
54125412 S::Source: permission_grant_state::IsSet,
54135413{
54145414 /// Build the final struct
···57585758 }
57595759 /// State trait tracking which required fields have been set
57605760 pub trait State: sealed::Sealed {
57615761- type Publisher;
57625761 type PublishedAt;
57635763- type Cid;
57625762+ type Publisher;
57645763 type Uri;
57645764+ type Cid;
57655765 }
57665766 /// Empty state - all required fields are unset
57675767 pub struct Empty(());
57685768 impl sealed::Sealed for Empty {}
57695769 impl State for Empty {
57705770- type Publisher = Unset;
57715770 type PublishedAt = Unset;
57725772- type Cid = Unset;
57715771+ type Publisher = Unset;
57735772 type Uri = Unset;
57745774- }
57755775- ///State transition - sets the `publisher` field to Set
57765776- pub struct SetPublisher<S: State = Empty>(PhantomData<fn() -> S>);
57775777- impl<S: State> sealed::Sealed for SetPublisher<S> {}
57785778- impl<S: State> State for SetPublisher<S> {
57795779- type Publisher = Set<members::publisher>;
57805780- type PublishedAt = S::PublishedAt;
57815781- type Cid = S::Cid;
57825782- type Uri = S::Uri;
57735773+ type Cid = Unset;
57835774 }
57845775 ///State transition - sets the `published_at` field to Set
57855776 pub struct SetPublishedAt<S: State = Empty>(PhantomData<fn() -> S>);
57865777 impl<S: State> sealed::Sealed for SetPublishedAt<S> {}
57875778 impl<S: State> State for SetPublishedAt<S> {
57885788- type Publisher = S::Publisher;
57895779 type PublishedAt = Set<members::published_at>;
57905790- type Cid = S::Cid;
57805780+ type Publisher = S::Publisher;
57915781 type Uri = S::Uri;
57825782+ type Cid = S::Cid;
57925783 }
57935793- ///State transition - sets the `cid` field to Set
57945794- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
57955795- impl<S: State> sealed::Sealed for SetCid<S> {}
57965796- impl<S: State> State for SetCid<S> {
57975797- type Publisher = S::Publisher;
57845784+ ///State transition - sets the `publisher` field to Set
57855785+ pub struct SetPublisher<S: State = Empty>(PhantomData<fn() -> S>);
57865786+ impl<S: State> sealed::Sealed for SetPublisher<S> {}
57875787+ impl<S: State> State for SetPublisher<S> {
57985788 type PublishedAt = S::PublishedAt;
57995799- type Cid = Set<members::cid>;
57895789+ type Publisher = Set<members::publisher>;
58005790 type Uri = S::Uri;
57915791+ type Cid = S::Cid;
58015792 }
58025793 ///State transition - sets the `uri` field to Set
58035794 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
58045795 impl<S: State> sealed::Sealed for SetUri<S> {}
58055796 impl<S: State> State for SetUri<S> {
58065806- type Publisher = S::Publisher;
58075797 type PublishedAt = S::PublishedAt;
58085808- type Cid = S::Cid;
57985798+ type Publisher = S::Publisher;
58095799 type Uri = Set<members::uri>;
58005800+ type Cid = S::Cid;
58015801+ }
58025802+ ///State transition - sets the `cid` field to Set
58035803+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
58045804+ impl<S: State> sealed::Sealed for SetCid<S> {}
58055805+ impl<S: State> State for SetCid<S> {
58065806+ type PublishedAt = S::PublishedAt;
58075807+ type Publisher = S::Publisher;
58085808+ type Uri = S::Uri;
58095809+ type Cid = Set<members::cid>;
58105810 }
58115811 /// Marker types for field names
58125812 #[allow(non_camel_case_types)]
58135813 pub mod members {
58145814+ ///Marker type for the `published_at` field
58155815+ pub struct published_at(());
58145816 ///Marker type for the `publisher` field
58155817 pub struct publisher(());
58165816- ///Marker type for the `published_at` field
58175817- pub struct published_at(());
58185818+ ///Marker type for the `uri` field
58195819+ pub struct uri(());
58185820 ///Marker type for the `cid` field
58195821 pub struct cid(());
58205820- ///Marker type for the `uri` field
58215821- pub struct uri(());
58225822 }
58235823}
58245824···59915991impl<'a, S> PublishedVersionViewBuilder<'a, S>
59925992where
59935993 S: published_version_view_state::State,
59945994- S::Publisher: published_version_view_state::IsSet,
59955994 S::PublishedAt: published_version_view_state::IsSet,
59965996- S::Cid: published_version_view_state::IsSet,
59955995+ S::Publisher: published_version_view_state::IsSet,
59975996 S::Uri: published_version_view_state::IsSet,
59975997+ S::Cid: published_version_view_state::IsSet,
59985998{
59995999 /// Build the final struct
60006000 pub fn build(self) -> PublishedVersionView<'a> {
···64186418 }
64196419 /// State trait tracking which required fields have been set
64206420 pub trait State: sealed::Sealed {
64216421- type By;
64226421 type IndexedAt;
64226422+ type By;
64236423 }
64246424 /// Empty state - all required fields are unset
64256425 pub struct Empty(());
64266426 impl sealed::Sealed for Empty {}
64276427 impl State for Empty {
64286428- type By = Unset;
64296428 type IndexedAt = Unset;
64306430- }
64316431- ///State transition - sets the `by` field to Set
64326432- pub struct SetBy<S: State = Empty>(PhantomData<fn() -> S>);
64336433- impl<S: State> sealed::Sealed for SetBy<S> {}
64346434- impl<S: State> State for SetBy<S> {
64356435- type By = Set<members::by>;
64366436- type IndexedAt = S::IndexedAt;
64296429+ type By = Unset;
64376430 }
64386431 ///State transition - sets the `indexed_at` field to Set
64396432 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
64406433 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
64416434 impl<S: State> State for SetIndexedAt<S> {
64426442- type By = S::By;
64436435 type IndexedAt = Set<members::indexed_at>;
64366436+ type By = S::By;
64376437+ }
64386438+ ///State transition - sets the `by` field to Set
64396439+ pub struct SetBy<S: State = Empty>(PhantomData<fn() -> S>);
64406440+ impl<S: State> sealed::Sealed for SetBy<S> {}
64416441+ impl<S: State> State for SetBy<S> {
64426442+ type IndexedAt = S::IndexedAt;
64436443+ type By = Set<members::by>;
64446444 }
64456445 /// Marker types for field names
64466446 #[allow(non_camel_case_types)]
64476447 pub mod members {
64486448- ///Marker type for the `by` field
64496449- pub struct by(());
64506448 ///Marker type for the `indexed_at` field
64516449 pub struct indexed_at(());
64506450+ ///Marker type for the `by` field
64516451+ pub struct by(());
64526452 }
64536453}
64546454···65216521impl<'a, S> ReasonLikeBuilder<'a, S>
65226522where
65236523 S: reason_like_state::State,
65246524- S::By: reason_like_state::IsSet,
65256524 S::IndexedAt: reason_like_state::IsSet,
65256525+ S::By: reason_like_state::IsSet,
65266526{
65276527 /// Build the final struct
65286528 pub fn build(self) -> ReasonLike<'a> {
+13-13
crates/weaver-api/src/sh_weaver/notebook/book.rs
···6363 }
6464 /// State trait tracking which required fields have been set
6565 pub trait State: sealed::Sealed {
6666- type Authors;
6766 type EntryList;
6767+ type Authors;
6868 }
6969 /// Empty state - all required fields are unset
7070 pub struct Empty(());
7171 impl sealed::Sealed for Empty {}
7272 impl State for Empty {
7373- type Authors = Unset;
7473 type EntryList = Unset;
7575- }
7676- ///State transition - sets the `authors` field to Set
7777- pub struct SetAuthors<S: State = Empty>(PhantomData<fn() -> S>);
7878- impl<S: State> sealed::Sealed for SetAuthors<S> {}
7979- impl<S: State> State for SetAuthors<S> {
8080- type Authors = Set<members::authors>;
8181- type EntryList = S::EntryList;
7474+ type Authors = Unset;
8275 }
8376 ///State transition - sets the `entry_list` field to Set
8477 pub struct SetEntryList<S: State = Empty>(PhantomData<fn() -> S>);
8578 impl<S: State> sealed::Sealed for SetEntryList<S> {}
8679 impl<S: State> State for SetEntryList<S> {
8787- type Authors = S::Authors;
8880 type EntryList = Set<members::entry_list>;
8181+ type Authors = S::Authors;
8282+ }
8383+ ///State transition - sets the `authors` field to Set
8484+ pub struct SetAuthors<S: State = Empty>(PhantomData<fn() -> S>);
8585+ impl<S: State> sealed::Sealed for SetAuthors<S> {}
8686+ impl<S: State> State for SetAuthors<S> {
8787+ type EntryList = S::EntryList;
8888+ type Authors = Set<members::authors>;
8989 }
9090 /// Marker types for field names
9191 #[allow(non_camel_case_types)]
9292 pub mod members {
9393- ///Marker type for the `authors` field
9494- pub struct authors(());
9593 ///Marker type for the `entry_list` field
9694 pub struct entry_list(());
9595+ ///Marker type for the `authors` field
9696+ pub struct authors(());
9797 }
9898}
9999···352352impl<'a, S> BookBuilder<'a, S>
353353where
354354 S: book_state::State,
355355- S::Authors: book_state::IsSet,
356355 S::EntryList: book_state::IsSet,
356356+ S::Authors: book_state::IsSet,
357357{
358358 /// Build the final struct
359359 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 Colours;
4142 type Name;
4243 type Variant;
4343- type Colours;
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 Colours = Unset;
4950 type Name = Unset;
5051 type Variant = Unset;
5151- type Colours = Unset;
5252+ }
5353+ ///State transition - sets the `colours` field to Set
5454+ pub struct SetColours<S: State = Empty>(PhantomData<fn() -> S>);
5555+ impl<S: State> sealed::Sealed for SetColours<S> {}
5656+ impl<S: State> State for SetColours<S> {
5757+ type Colours = Set<members::colours>;
5858+ type Name = S::Name;
5959+ type Variant = S::Variant;
5260 }
5361 ///State transition - sets the `name` field to Set
5462 pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
5563 impl<S: State> sealed::Sealed for SetName<S> {}
5664 impl<S: State> State for SetName<S> {
6565+ type Colours = S::Colours;
5766 type Name = Set<members::name>;
5867 type Variant = S::Variant;
5959- type Colours = S::Colours;
6068 }
6169 ///State transition - sets the `variant` field to Set
6270 pub struct SetVariant<S: State = Empty>(PhantomData<fn() -> S>);
6371 impl<S: State> sealed::Sealed for SetVariant<S> {}
6472 impl<S: State> State for SetVariant<S> {
6565- type Name = S::Name;
6666- type Variant = Set<members::variant>;
6773 type Colours = S::Colours;
6868- }
6969- ///State transition - sets the `colours` field to Set
7070- pub struct SetColours<S: State = Empty>(PhantomData<fn() -> S>);
7171- impl<S: State> sealed::Sealed for SetColours<S> {}
7272- impl<S: State> State for SetColours<S> {
7374 type Name = S::Name;
7474- type Variant = S::Variant;
7575- type Colours = Set<members::colours>;
7575+ type Variant = Set<members::variant>;
7676 }
7777 /// Marker types for field names
7878 #[allow(non_camel_case_types)]
7979 pub mod members {
8080+ ///Marker type for the `colours` field
8181+ pub struct colours(());
8082 ///Marker type for the `name` field
8183 pub struct name(());
8284 ///Marker type for the `variant` field
8385 pub struct variant(());
8484- ///Marker type for the `colours` field
8585- pub struct colours(());
8686 }
8787}
8888···175175impl<'a, S> ColourSchemeBuilder<'a, S>
176176where
177177 S: colour_scheme_state::State,
178178+ S::Colours: colour_scheme_state::IsSet,
178179 S::Name: colour_scheme_state::IsSet,
179180 S::Variant: colour_scheme_state::IsSet,
180180- S::Colours: 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
···6060 }
6161 /// State trait tracking which required fields have been set
6262 pub trait State: sealed::Sealed {
6363- type Path;
6363+ type CreatedAt;
6464 type Title;
6565 type Content;
6666- type CreatedAt;
6666+ type Path;
6767 }
6868 /// Empty state - all required fields are unset
6969 pub struct Empty(());
7070 impl sealed::Sealed for Empty {}
7171 impl State for Empty {
7272- type Path = Unset;
7272+ type CreatedAt = Unset;
7373 type Title = Unset;
7474 type Content = Unset;
7575- type CreatedAt = Unset;
7575+ type Path = Unset;
7676 }
7777- ///State transition - sets the `path` field to Set
7878- pub struct SetPath<S: State = Empty>(PhantomData<fn() -> S>);
7979- impl<S: State> sealed::Sealed for SetPath<S> {}
8080- impl<S: State> State for SetPath<S> {
8181- type Path = Set<members::path>;
7777+ ///State transition - sets the `created_at` field to Set
7878+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
7979+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
8080+ impl<S: State> State for SetCreatedAt<S> {
8181+ type CreatedAt = Set<members::created_at>;
8282 type Title = S::Title;
8383 type Content = S::Content;
8484- type CreatedAt = S::CreatedAt;
8484+ type Path = S::Path;
8585 }
8686 ///State transition - sets the `title` field to Set
8787 pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
8888 impl<S: State> sealed::Sealed for SetTitle<S> {}
8989 impl<S: State> State for SetTitle<S> {
9090- type Path = S::Path;
9090+ type CreatedAt = S::CreatedAt;
9191 type Title = Set<members::title>;
9292 type Content = S::Content;
9393- type CreatedAt = S::CreatedAt;
9393+ type Path = S::Path;
9494 }
9595 ///State transition - sets the `content` field to Set
9696 pub struct SetContent<S: State = Empty>(PhantomData<fn() -> S>);
9797 impl<S: State> sealed::Sealed for SetContent<S> {}
9898 impl<S: State> State for SetContent<S> {
9999- type Path = S::Path;
9999+ type CreatedAt = S::CreatedAt;
100100 type Title = S::Title;
101101 type Content = Set<members::content>;
102102- type CreatedAt = S::CreatedAt;
103103- }
104104- ///State transition - sets the `created_at` field to Set
105105- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
106106- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
107107- impl<S: State> State for SetCreatedAt<S> {
108102 type Path = S::Path;
103103+ }
104104+ ///State transition - sets the `path` field to Set
105105+ pub struct SetPath<S: State = Empty>(PhantomData<fn() -> S>);
106106+ impl<S: State> sealed::Sealed for SetPath<S> {}
107107+ impl<S: State> State for SetPath<S> {
108108+ type CreatedAt = S::CreatedAt;
109109 type Title = S::Title;
110110 type Content = S::Content;
111111- type CreatedAt = Set<members::created_at>;
111111+ type Path = Set<members::path>;
112112 }
113113 /// Marker types for field names
114114 #[allow(non_camel_case_types)]
115115 pub mod members {
116116- ///Marker type for the `path` field
117117- pub struct path(());
116116+ ///Marker type for the `created_at` field
117117+ pub struct created_at(());
118118 ///Marker type for the `title` field
119119 pub struct title(());
120120 ///Marker type for the `content` field
121121 pub struct content(());
122122- ///Marker type for the `created_at` field
123123- pub struct created_at(());
122122+ ///Marker type for the `path` field
123123+ pub struct path(());
124124 }
125125}
126126···358358impl<'a, S> EntryBuilder<'a, S>
359359where
360360 S: entry_state::State,
361361- S::Path: entry_state::IsSet,
361361+ S::CreatedAt: entry_state::IsSet,
362362 S::Title: entry_state::IsSet,
363363 S::Content: entry_state::IsSet,
364364- S::CreatedAt: entry_state::IsSet,
364364+ S::Path: entry_state::IsSet,
365365{
366366 /// Build the final struct
367367 pub fn build(self) -> Entry<'a> {
···188188 }
189189 /// State trait tracking which required fields have been set
190190 pub trait State: sealed::Sealed {
191191- type Uri;
192191 type Cid;
192192+ type Uri;
193193 }
194194 /// Empty state - all required fields are unset
195195 pub struct Empty(());
196196 impl sealed::Sealed for Empty {}
197197 impl State for Empty {
198198- type Uri = Unset;
199198 type Cid = Unset;
200200- }
201201- ///State transition - sets the `uri` field to Set
202202- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
203203- impl<S: State> sealed::Sealed for SetUri<S> {}
204204- impl<S: State> State for SetUri<S> {
205205- type Uri = Set<members::uri>;
206206- type Cid = S::Cid;
199199+ type Uri = Unset;
207200 }
208201 ///State transition - sets the `cid` field to Set
209202 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
210203 impl<S: State> sealed::Sealed for SetCid<S> {}
211204 impl<S: State> State for SetCid<S> {
212212- type Uri = S::Uri;
213205 type Cid = Set<members::cid>;
206206+ type Uri = S::Uri;
207207+ }
208208+ ///State transition - sets the `uri` field to Set
209209+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
210210+ impl<S: State> sealed::Sealed for SetUri<S> {}
211211+ impl<S: State> State for SetUri<S> {
212212+ type Cid = S::Cid;
213213+ type Uri = Set<members::uri>;
214214 }
215215 /// Marker types for field names
216216 #[allow(non_camel_case_types)]
217217 pub mod members {
218218- ///Marker type for the `uri` field
219219- pub struct uri(());
220218 ///Marker type for the `cid` field
221219 pub struct cid(());
220220+ ///Marker type for the `uri` field
221221+ pub struct uri(());
222222 }
223223}
224224···328328impl<'a, S> NotebookRefBuilder<'a, S>
329329where
330330 S: notebook_ref_state::State,
331331- S::Uri: notebook_ref_state::IsSet,
332331 S::Cid: notebook_ref_state::IsSet,
332332+ S::Uri: notebook_ref_state::IsSet,
333333{
334334 /// Build the final struct
335335 pub fn build(self) -> NotebookRef<'a> {
···214214 }
215215 /// State trait tracking which required fields have been set
216216 pub trait State: sealed::Sealed {
217217- type Progress;
218217 type Notebook;
218218+ type Progress;
219219 }
220220 /// Empty state - all required fields are unset
221221 pub struct Empty(());
222222 impl sealed::Sealed for Empty {}
223223 impl State for Empty {
224224- type Progress = Unset;
225224 type Notebook = Unset;
226226- }
227227- ///State transition - sets the `progress` field to Set
228228- pub struct SetProgress<S: State = Empty>(PhantomData<fn() -> S>);
229229- impl<S: State> sealed::Sealed for SetProgress<S> {}
230230- impl<S: State> State for SetProgress<S> {
231231- type Progress = Set<members::progress>;
232232- type Notebook = S::Notebook;
225225+ type Progress = Unset;
233226 }
234227 ///State transition - sets the `notebook` field to Set
235228 pub struct SetNotebook<S: State = Empty>(PhantomData<fn() -> S>);
236229 impl<S: State> sealed::Sealed for SetNotebook<S> {}
237230 impl<S: State> State for SetNotebook<S> {
238238- type Progress = S::Progress;
239231 type Notebook = Set<members::notebook>;
232232+ type Progress = S::Progress;
233233+ }
234234+ ///State transition - sets the `progress` field to Set
235235+ pub struct SetProgress<S: State = Empty>(PhantomData<fn() -> S>);
236236+ impl<S: State> sealed::Sealed for SetProgress<S> {}
237237+ impl<S: State> State for SetProgress<S> {
238238+ type Notebook = S::Notebook;
239239+ type Progress = Set<members::progress>;
240240 }
241241 /// Marker types for field names
242242 #[allow(non_camel_case_types)]
243243 pub mod members {
244244- ///Marker type for the `progress` field
245245- pub struct progress(());
246244 ///Marker type for the `notebook` field
247245 pub struct notebook(());
246246+ ///Marker type for the `progress` field
247247+ pub struct progress(());
248248 }
249249}
250250···337337impl<'a, S> ReadingHistoryItemBuilder<'a, S>
338338where
339339 S: reading_history_item_state::State,
340340- S::Progress: reading_history_item_state::IsSet,
341340 S::Notebook: reading_history_item_state::IsSet,
341341+ S::Progress: reading_history_item_state::IsSet,
342342{
343343 /// Build the final struct
344344 pub fn build(self) -> ReadingHistoryItem<'a> {
···3434 }
3535 /// State trait tracking which required fields have been set
3636 pub trait State: sealed::Sealed {
3737+ type Actor;
3738 type Notebook;
3839 type Entry;
3939- type Actor;
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 Actor = Unset;
4546 type Notebook = Unset;
4647 type Entry = Unset;
4747- type Actor = Unset;
4848+ }
4949+ ///State transition - sets the `actor` field to Set
5050+ pub struct SetActor<S: State = Empty>(PhantomData<fn() -> S>);
5151+ impl<S: State> sealed::Sealed for SetActor<S> {}
5252+ impl<S: State> State for SetActor<S> {
5353+ type Actor = Set<members::actor>;
5454+ type Notebook = S::Notebook;
5555+ type Entry = S::Entry;
4856 }
4957 ///State transition - sets the `notebook` field to Set
5058 pub struct SetNotebook<S: State = Empty>(PhantomData<fn() -> S>);
5159 impl<S: State> sealed::Sealed for SetNotebook<S> {}
5260 impl<S: State> State for SetNotebook<S> {
6161+ type Actor = S::Actor;
5362 type Notebook = Set<members::notebook>;
5463 type Entry = S::Entry;
5555- type Actor = S::Actor;
5664 }
5765 ///State transition - sets the `entry` field to Set
5866 pub struct SetEntry<S: State = Empty>(PhantomData<fn() -> S>);
5967 impl<S: State> sealed::Sealed for SetEntry<S> {}
6068 impl<S: State> State for SetEntry<S> {
6161- type Notebook = S::Notebook;
6262- type Entry = Set<members::entry>;
6369 type Actor = S::Actor;
6464- }
6565- ///State transition - sets the `actor` field to Set
6666- pub struct SetActor<S: State = Empty>(PhantomData<fn() -> S>);
6767- impl<S: State> sealed::Sealed for SetActor<S> {}
6868- impl<S: State> State for SetActor<S> {
6970 type Notebook = S::Notebook;
7070- type Entry = S::Entry;
7171- type Actor = Set<members::actor>;
7171+ type Entry = Set<members::entry>;
7272 }
7373 /// Marker types for field names
7474 #[allow(non_camel_case_types)]
7575 pub mod members {
7676+ ///Marker type for the `actor` field
7777+ pub struct actor(());
7678 ///Marker type for the `notebook` field
7779 pub struct notebook(());
7880 ///Marker type for the `entry` field
7981 pub struct entry(());
8080- ///Marker type for the `actor` field
8181- pub struct actor(());
8282 }
8383}
8484···171171impl<'a, S> ResolveEntryBuilder<'a, S>
172172where
173173 S: resolve_entry_state::State,
174174+ S::Actor: resolve_entry_state::IsSet,
174175 S::Notebook: resolve_entry_state::IsSet,
175176 S::Entry: resolve_entry_state::IsSet,
176176- S::Actor: resolve_entry_state::IsSet,
177177{
178178 /// Build the final struct
179179 pub fn build(self) -> ResolveEntry<'a> {
···3838 }
3939 /// State trait tracking which required fields have been set
4040 pub trait State: sealed::Sealed {
4141- type Actor;
4241 type Name;
4242+ type Actor;
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 Actor = Unset;
4948 type Name = Unset;
5050- }
5151- ///State transition - sets the `actor` field to Set
5252- pub struct SetActor<S: State = Empty>(PhantomData<fn() -> S>);
5353- impl<S: State> sealed::Sealed for SetActor<S> {}
5454- impl<S: State> State for SetActor<S> {
5555- type Actor = Set<members::actor>;
5656- type Name = S::Name;
4949+ type Actor = Unset;
5750 }
5851 ///State transition - sets the `name` field to Set
5952 pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
6053 impl<S: State> sealed::Sealed for SetName<S> {}
6154 impl<S: State> State for SetName<S> {
6262- type Actor = S::Actor;
6355 type Name = Set<members::name>;
5656+ type Actor = S::Actor;
5757+ }
5858+ ///State transition - sets the `actor` field to Set
5959+ pub struct SetActor<S: State = Empty>(PhantomData<fn() -> S>);
6060+ impl<S: State> sealed::Sealed for SetActor<S> {}
6161+ impl<S: State> State for SetActor<S> {
6262+ type Name = S::Name;
6363+ type Actor = Set<members::actor>;
6464 }
6565 /// Marker types for field names
6666 #[allow(non_camel_case_types)]
6767 pub mod members {
6868- ///Marker type for the `actor` field
6969- pub struct actor(());
7068 ///Marker type for the `name` field
7169 pub struct name(());
7070+ ///Marker type for the `actor` field
7171+ pub struct actor(());
7272 }
7373}
7474···175175impl<'a, S> ResolveNotebookBuilder<'a, S>
176176where
177177 S: resolve_notebook_state::State,
178178- S::Actor: resolve_notebook_state::IsSet,
179178 S::Name: resolve_notebook_state::IsSet,
179179+ S::Actor: resolve_notebook_state::IsSet,
180180{
181181 /// Build the final struct
182182 pub fn build(self) -> ResolveNotebook<'a> {
+78-78
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 Content;
3940 type Name;
4041 type Did;
4141- type Content;
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 Content = Unset;
4748 type Name = Unset;
4849 type Did = Unset;
4949- type Content = Unset;
5050+ }
5151+ ///State transition - sets the `content` field to Set
5252+ pub struct SetContent<S: State = Empty>(PhantomData<fn() -> S>);
5353+ impl<S: State> sealed::Sealed for SetContent<S> {}
5454+ impl<S: State> State for SetContent<S> {
5555+ type Content = Set<members::content>;
5656+ type Name = S::Name;
5757+ type Did = S::Did;
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 Content = S::Content;
5564 type Name = Set<members::name>;
5665 type Did = S::Did;
5757- type Content = S::Content;
5866 }
5967 ///State transition - sets the `did` field to Set
6068 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
6169 impl<S: State> sealed::Sealed for SetDid<S> {}
6270 impl<S: State> State for SetDid<S> {
6363- type Name = S::Name;
6464- type Did = Set<members::did>;
6571 type Content = S::Content;
6666- }
6767- ///State transition - sets the `content` field to Set
6868- pub struct SetContent<S: State = Empty>(PhantomData<fn() -> S>);
6969- impl<S: State> sealed::Sealed for SetContent<S> {}
7070- impl<S: State> State for SetContent<S> {
7172 type Name = S::Name;
7272- type Did = S::Did;
7373- type Content = Set<members::content>;
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 `content` field
7979+ pub struct content(());
7880 ///Marker type for the `name` field
7981 pub struct name(());
8082 ///Marker type for the `did` field
8183 pub struct did(());
8282- ///Marker type for the `content` field
8383- pub struct content(());
8484 }
8585}
8686···173173impl<'a, S> CodeThemeFileBuilder<'a, S>
174174where
175175 S: code_theme_file_state::State,
176176+ S::Content: code_theme_file_state::IsSet,
176177 S::Name: code_theme_file_state::IsSet,
177178 S::Did: code_theme_file_state::IsSet,
178178- S::Content: code_theme_file_state::IsSet,
179179{
180180 /// Build the final struct
181181 pub fn build(self) -> CodeThemeFile<'a> {
···837837 }
838838 /// State trait tracking which required fields have been set
839839 pub trait State: sealed::Sealed {
840840+ type Did;
840841 type Content;
841842 type Name;
842842- type Did;
843843 }
844844 /// Empty state - all required fields are unset
845845 pub struct Empty(());
846846 impl sealed::Sealed for Empty {}
847847 impl State for Empty {
848848+ type Did = Unset;
848849 type Content = Unset;
849850 type Name = Unset;
850850- type Did = Unset;
851851+ }
852852+ ///State transition - sets the `did` field to Set
853853+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
854854+ impl<S: State> sealed::Sealed for SetDid<S> {}
855855+ impl<S: State> State for SetDid<S> {
856856+ type Did = Set<members::did>;
857857+ type Content = S::Content;
858858+ type Name = S::Name;
851859 }
852860 ///State transition - sets the `content` field to Set
853861 pub struct SetContent<S: State = Empty>(PhantomData<fn() -> S>);
854862 impl<S: State> sealed::Sealed for SetContent<S> {}
855863 impl<S: State> State for SetContent<S> {
864864+ type Did = S::Did;
856865 type Content = Set<members::content>;
857866 type Name = S::Name;
858858- type Did = S::Did;
859867 }
860868 ///State transition - sets the `name` field to Set
861869 pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
862870 impl<S: State> sealed::Sealed for SetName<S> {}
863871 impl<S: State> State for SetName<S> {
864864- type Content = S::Content;
865865- type Name = Set<members::name>;
866872 type Did = S::Did;
867867- }
868868- ///State transition - sets the `did` field to Set
869869- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
870870- impl<S: State> sealed::Sealed for SetDid<S> {}
871871- impl<S: State> State for SetDid<S> {
872873 type Content = S::Content;
873873- type Name = S::Name;
874874- type Did = Set<members::did>;
874874+ type Name = Set<members::name>;
875875 }
876876 /// Marker types for field names
877877 #[allow(non_camel_case_types)]
878878 pub mod members {
879879+ ///Marker type for the `did` field
880880+ pub struct did(());
879881 ///Marker type for the `content` field
880882 pub struct content(());
881883 ///Marker type for the `name` field
882884 pub struct name(());
883883- ///Marker type for the `did` field
884884- pub struct did(());
885885 }
886886}
887887···974974impl<'a, S> FontFileBuilder<'a, S>
975975where
976976 S: font_file_state::State,
977977+ S::Did: font_file_state::IsSet,
977978 S::Content: font_file_state::IsSet,
978979 S::Name: font_file_state::IsSet,
979979- S::Did: font_file_state::IsSet,
980980{
981981 /// Build the final struct
982982 pub fn build(self) -> FontFile<'a> {
···10681068 /// State trait tracking which required fields have been set
10691069 pub trait State: sealed::Sealed {
10701070 type DarkScheme;
10711071+ type LightScheme;
10721072+ type Spacing;
10711073 type DarkCodeTheme;
10721072- type Spacing;
10731073- type LightScheme;
10741074- type Fonts;
10751074 type LightCodeTheme;
10751075+ type Fonts;
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;
10821082- type DarkCodeTheme = Unset;
10831083- type Spacing = Unset;
10841082 type LightScheme = Unset;
10851085- type Fonts = Unset;
10831083+ type Spacing = Unset;
10841084+ type DarkCodeTheme = Unset;
10861085 type LightCodeTheme = Unset;
10861086+ type Fonts = 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>;
10931093- type DarkCodeTheme = S::DarkCodeTheme;
10941094- type Spacing = S::Spacing;
10951093 type LightScheme = S::LightScheme;
10961096- type Fonts = S::Fonts;
10941094+ type Spacing = S::Spacing;
10951095+ type DarkCodeTheme = S::DarkCodeTheme;
10971096 type LightCodeTheme = S::LightCodeTheme;
10971097+ type Fonts = S::Fonts;
10981098 }
10991099- ///State transition - sets the `dark_code_theme` field to Set
11001100- pub struct SetDarkCodeTheme<S: State = Empty>(PhantomData<fn() -> S>);
11011101- impl<S: State> sealed::Sealed for SetDarkCodeTheme<S> {}
11021102- impl<S: State> State for SetDarkCodeTheme<S> {
10991099+ ///State transition - sets the `light_scheme` field to Set
11001100+ pub struct SetLightScheme<S: State = Empty>(PhantomData<fn() -> S>);
11011101+ impl<S: State> sealed::Sealed for SetLightScheme<S> {}
11021102+ impl<S: State> State for SetLightScheme<S> {
11031103 type DarkScheme = S::DarkScheme;
11041104- type DarkCodeTheme = Set<members::dark_code_theme>;
11041104+ type LightScheme = Set<members::light_scheme>;
11051105 type Spacing = S::Spacing;
11061106- type LightScheme = S::LightScheme;
11061106+ type DarkCodeTheme = S::DarkCodeTheme;
11071107+ type LightCodeTheme = S::LightCodeTheme;
11071108 type Fonts = S::Fonts;
11081108- type LightCodeTheme = S::LightCodeTheme;
11091109 }
11101110 ///State transition - sets the `spacing` field to Set
11111111 pub struct SetSpacing<S: State = Empty>(PhantomData<fn() -> S>);
11121112 impl<S: State> sealed::Sealed for SetSpacing<S> {}
11131113 impl<S: State> State for SetSpacing<S> {
11141114 type DarkScheme = S::DarkScheme;
11151115- type DarkCodeTheme = S::DarkCodeTheme;
11151115+ type LightScheme = S::LightScheme;
11161116 type Spacing = Set<members::spacing>;
11171117+ type DarkCodeTheme = S::DarkCodeTheme;
11181118+ type LightCodeTheme = S::LightCodeTheme;
11191119+ type Fonts = S::Fonts;
11201120+ }
11211121+ ///State transition - sets the `dark_code_theme` field to Set
11221122+ pub struct SetDarkCodeTheme<S: State = Empty>(PhantomData<fn() -> S>);
11231123+ impl<S: State> sealed::Sealed for SetDarkCodeTheme<S> {}
11241124+ impl<S: State> State for SetDarkCodeTheme<S> {
11251125+ type DarkScheme = S::DarkScheme;
11171126 type LightScheme = S::LightScheme;
11181118- type Fonts = S::Fonts;
11271127+ type Spacing = S::Spacing;
11281128+ type DarkCodeTheme = Set<members::dark_code_theme>;
11191129 type LightCodeTheme = S::LightCodeTheme;
11301130+ type Fonts = S::Fonts;
11201131 }
11211121- ///State transition - sets the `light_scheme` field to Set
11221122- pub struct SetLightScheme<S: State = Empty>(PhantomData<fn() -> S>);
11231123- impl<S: State> sealed::Sealed for SetLightScheme<S> {}
11241124- impl<S: State> State for SetLightScheme<S> {
11321132+ ///State transition - sets the `light_code_theme` field to Set
11331133+ pub struct SetLightCodeTheme<S: State = Empty>(PhantomData<fn() -> S>);
11341134+ impl<S: State> sealed::Sealed for SetLightCodeTheme<S> {}
11351135+ impl<S: State> State for SetLightCodeTheme<S> {
11251136 type DarkScheme = S::DarkScheme;
11261126- type DarkCodeTheme = S::DarkCodeTheme;
11371137+ type LightScheme = S::LightScheme;
11271138 type Spacing = S::Spacing;
11281128- type LightScheme = Set<members::light_scheme>;
11391139+ type DarkCodeTheme = S::DarkCodeTheme;
11401140+ type LightCodeTheme = Set<members::light_code_theme>;
11291141 type Fonts = S::Fonts;
11301130- type LightCodeTheme = S::LightCodeTheme;
11311142 }
11321143 ///State transition - sets the `fonts` field to Set
11331144 pub struct SetFonts<S: State = Empty>(PhantomData<fn() -> S>);
11341145 impl<S: State> sealed::Sealed for SetFonts<S> {}
11351146 impl<S: State> State for SetFonts<S> {
11361147 type DarkScheme = S::DarkScheme;
11371137- type DarkCodeTheme = S::DarkCodeTheme;
11481148+ type LightScheme = S::LightScheme;
11381149 type Spacing = S::Spacing;
11391139- type LightScheme = S::LightScheme;
11401140- type Fonts = Set<members::fonts>;
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> {
11471147- type DarkScheme = S::DarkScheme;
11481150 type DarkCodeTheme = S::DarkCodeTheme;
11491149- type Spacing = S::Spacing;
11501150- type LightScheme = S::LightScheme;
11511151- type Fonts = S::Fonts;
11521152- type LightCodeTheme = Set<members::light_code_theme>;
11511151+ type LightCodeTheme = S::LightCodeTheme;
11521152+ type Fonts = Set<members::fonts>;
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(());
11591159- ///Marker type for the `dark_code_theme` field
11601160- pub struct dark_code_theme(());
11611161- ///Marker type for the `spacing` field
11621162- pub struct spacing(());
11631159 ///Marker type for the `light_scheme` field
11641160 pub struct light_scheme(());
11651165- ///Marker type for the `fonts` field
11661166- pub struct fonts(());
11611161+ ///Marker type for the `spacing` field
11621162+ pub struct spacing(());
11631163+ ///Marker type for the `dark_code_theme` field
11641164+ pub struct dark_code_theme(());
11671165 ///Marker type for the `light_code_theme` field
11681166 pub struct light_code_theme(());
11671167+ ///Marker type for the `fonts` field
11681168+ pub struct fonts(());
11691169 }
11701170}
11711171···13391339where
13401340 S: theme_state::State,
13411341 S::DarkScheme: theme_state::IsSet,
13421342- S::DarkCodeTheme: theme_state::IsSet,
13431343- S::Spacing: theme_state::IsSet,
13441342 S::LightScheme: theme_state::IsSet,
13451345- S::Fonts: theme_state::IsSet,
13431343+ S::Spacing: theme_state::IsSet,
13441344+ S::DarkCodeTheme: theme_state::IsSet,
13461345 S::LightCodeTheme: theme_state::IsSet,
13461346+ S::Fonts: theme_state::IsSet,
13471347{
13481348 /// Build the final struct
13491349 pub fn build(self) -> Theme<'a> {
+108-108
crates/weaver-api/src/sh_weaver/notification.rs
···5252 }
5353 /// State trait tracking which required fields have been set
5454 pub trait State: sealed::Sealed {
5555- type Reason;
5655 type Uri;
5757- type Cid;
5858- type Author;
5956 type IndexedAt;
5757+ type Author;
5858+ type Cid;
5959+ type Reason;
6060 type IsRead;
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 Reason = Unset;
6766 type Uri = Unset;
6868- type Cid = Unset;
6969- type Author = Unset;
7067 type IndexedAt = Unset;
6868+ type Author = Unset;
6969+ type Cid = Unset;
7070+ type Reason = Unset;
7171 type IsRead = Unset;
7272- }
7373- ///State transition - sets the `reason` field to Set
7474- pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
7575- impl<S: State> sealed::Sealed for SetReason<S> {}
7676- impl<S: State> State for SetReason<S> {
7777- type Reason = Set<members::reason>;
7878- type Uri = S::Uri;
7979- type Cid = S::Cid;
8080- type Author = S::Author;
8181- type IndexedAt = S::IndexedAt;
8282- type IsRead = S::IsRead;
8372 }
8473 ///State transition - sets the `uri` field to Set
8574 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
8675 impl<S: State> sealed::Sealed for SetUri<S> {}
8776 impl<S: State> State for SetUri<S> {
8888- type Reason = S::Reason;
8977 type Uri = Set<members::uri>;
9090- type Cid = S::Cid;
9191- type Author = S::Author;
9278 type IndexedAt = S::IndexedAt;
7979+ type Author = S::Author;
8080+ type Cid = S::Cid;
8181+ type Reason = S::Reason;
9382 type IsRead = S::IsRead;
9483 }
9595- ///State transition - sets the `cid` field to Set
9696- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
9797- impl<S: State> sealed::Sealed for SetCid<S> {}
9898- impl<S: State> State for SetCid<S> {
9999- type Reason = S::Reason;
8484+ ///State transition - sets the `indexed_at` field to Set
8585+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
8686+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
8787+ impl<S: State> State for SetIndexedAt<S> {
10088 type Uri = S::Uri;
101101- type Cid = Set<members::cid>;
8989+ type IndexedAt = Set<members::indexed_at>;
10290 type Author = S::Author;
103103- type IndexedAt = S::IndexedAt;
9191+ type Cid = S::Cid;
9292+ type Reason = S::Reason;
10493 type IsRead = S::IsRead;
10594 }
10695 ///State transition - sets the `author` field to Set
10796 pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
10897 impl<S: State> sealed::Sealed for SetAuthor<S> {}
10998 impl<S: State> State for SetAuthor<S> {
110110- type Reason = S::Reason;
11199 type Uri = S::Uri;
112112- type Cid = S::Cid;
100100+ type IndexedAt = S::IndexedAt;
113101 type Author = Set<members::author>;
102102+ type Cid = S::Cid;
103103+ type Reason = S::Reason;
104104+ type IsRead = S::IsRead;
105105+ }
106106+ ///State transition - sets the `cid` field to Set
107107+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
108108+ impl<S: State> sealed::Sealed for SetCid<S> {}
109109+ impl<S: State> State for SetCid<S> {
110110+ type Uri = S::Uri;
114111 type IndexedAt = S::IndexedAt;
112112+ type Author = S::Author;
113113+ type Cid = Set<members::cid>;
114114+ type Reason = S::Reason;
115115 type IsRead = S::IsRead;
116116 }
117117- ///State transition - sets the `indexed_at` field to Set
118118- pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
119119- impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
120120- impl<S: State> State for SetIndexedAt<S> {
121121- type Reason = S::Reason;
117117+ ///State transition - sets the `reason` field to Set
118118+ pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
119119+ impl<S: State> sealed::Sealed for SetReason<S> {}
120120+ impl<S: State> State for SetReason<S> {
122121 type Uri = S::Uri;
123123- type Cid = S::Cid;
122122+ type IndexedAt = S::IndexedAt;
124123 type Author = S::Author;
125125- type IndexedAt = Set<members::indexed_at>;
124124+ type Cid = S::Cid;
125125+ type Reason = Set<members::reason>;
126126 type IsRead = S::IsRead;
127127 }
128128 ///State transition - sets the `is_read` field to Set
129129 pub struct SetIsRead<S: State = Empty>(PhantomData<fn() -> S>);
130130 impl<S: State> sealed::Sealed for SetIsRead<S> {}
131131 impl<S: State> State for SetIsRead<S> {
132132- type Reason = S::Reason;
133132 type Uri = S::Uri;
134134- type Cid = S::Cid;
133133+ type IndexedAt = S::IndexedAt;
135134 type Author = S::Author;
136136- type IndexedAt = S::IndexedAt;
135135+ type Cid = S::Cid;
136136+ type Reason = S::Reason;
137137 type IsRead = Set<members::is_read>;
138138 }
139139 /// Marker types for field names
140140 #[allow(non_camel_case_types)]
141141 pub mod members {
142142- ///Marker type for the `reason` field
143143- pub struct reason(());
144142 ///Marker type for the `uri` field
145143 pub struct uri(());
144144+ ///Marker type for the `indexed_at` field
145145+ pub struct indexed_at(());
146146+ ///Marker type for the `author` field
147147+ pub struct author(());
146148 ///Marker type for the `cid` field
147149 pub struct cid(());
148148- ///Marker type for the `author` field
149149- pub struct author(());
150150- ///Marker type for the `indexed_at` field
151151- pub struct indexed_at(());
150150+ ///Marker type for the `reason` field
151151+ pub struct reason(());
152152 ///Marker type for the `is_read` field
153153 pub struct is_read(());
154154 }
···343343impl<'a, S> NotificationBuilder<'a, S>
344344where
345345 S: notification_state::State,
346346- S::Reason: notification_state::IsSet,
347346 S::Uri: notification_state::IsSet,
348348- S::Cid: notification_state::IsSet,
349349- S::Author: notification_state::IsSet,
350347 S::IndexedAt: notification_state::IsSet,
348348+ S::Author: notification_state::IsSet,
349349+ S::Cid: notification_state::IsSet,
350350+ S::Reason: notification_state::IsSet,
351351 S::IsRead: notification_state::IsSet,
352352{
353353 /// Build the final struct
···801801 }
802802 /// State trait tracking which required fields have been set
803803 pub trait State: sealed::Sealed {
804804- type Subject;
805805- type Actors;
806804 type MostRecentAt;
807807- type Reason;
808805 type Count;
806806+ type Subject;
807807+ type Reason;
808808+ type Actors;
809809 }
810810 /// Empty state - all required fields are unset
811811 pub struct Empty(());
812812 impl sealed::Sealed for Empty {}
813813 impl State for Empty {
814814- type Subject = Unset;
815815- type Actors = Unset;
816814 type MostRecentAt = Unset;
817817- type Reason = Unset;
818815 type Count = Unset;
819819- }
820820- ///State transition - sets the `subject` field to Set
821821- pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
822822- impl<S: State> sealed::Sealed for SetSubject<S> {}
823823- impl<S: State> State for SetSubject<S> {
824824- type Subject = Set<members::subject>;
825825- type Actors = S::Actors;
826826- type MostRecentAt = S::MostRecentAt;
827827- type Reason = S::Reason;
828828- type Count = S::Count;
829829- }
830830- ///State transition - sets the `actors` field to Set
831831- pub struct SetActors<S: State = Empty>(PhantomData<fn() -> S>);
832832- impl<S: State> sealed::Sealed for SetActors<S> {}
833833- impl<S: State> State for SetActors<S> {
834834- type Subject = S::Subject;
835835- type Actors = Set<members::actors>;
836836- type MostRecentAt = S::MostRecentAt;
837837- type Reason = S::Reason;
838838- type Count = S::Count;
816816+ type Subject = Unset;
817817+ type Reason = Unset;
818818+ type Actors = Unset;
839819 }
840820 ///State transition - sets the `most_recent_at` field to Set
841821 pub struct SetMostRecentAt<S: State = Empty>(PhantomData<fn() -> S>);
842822 impl<S: State> sealed::Sealed for SetMostRecentAt<S> {}
843823 impl<S: State> State for SetMostRecentAt<S> {
824824+ type MostRecentAt = Set<members::most_recent_at>;
825825+ type Count = S::Count;
844826 type Subject = S::Subject;
827827+ type Reason = S::Reason;
845828 type Actors = S::Actors;
846846- type MostRecentAt = Set<members::most_recent_at>;
829829+ }
830830+ ///State transition - sets the `count` field to Set
831831+ pub struct SetCount<S: State = Empty>(PhantomData<fn() -> S>);
832832+ impl<S: State> sealed::Sealed for SetCount<S> {}
833833+ impl<S: State> State for SetCount<S> {
834834+ type MostRecentAt = S::MostRecentAt;
835835+ type Count = Set<members::count>;
836836+ type Subject = S::Subject;
847837 type Reason = S::Reason;
838838+ type Actors = S::Actors;
839839+ }
840840+ ///State transition - sets the `subject` field to Set
841841+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
842842+ impl<S: State> sealed::Sealed for SetSubject<S> {}
843843+ impl<S: State> State for SetSubject<S> {
844844+ type MostRecentAt = S::MostRecentAt;
848845 type Count = S::Count;
846846+ type Subject = Set<members::subject>;
847847+ type Reason = S::Reason;
848848+ type Actors = S::Actors;
849849 }
850850 ///State transition - sets the `reason` field to Set
851851 pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
852852 impl<S: State> sealed::Sealed for SetReason<S> {}
853853 impl<S: State> State for SetReason<S> {
854854- type Subject = S::Subject;
855855- type Actors = S::Actors;
856854 type MostRecentAt = S::MostRecentAt;
857857- type Reason = Set<members::reason>;
858855 type Count = S::Count;
859859- }
860860- ///State transition - sets the `count` field to Set
861861- pub struct SetCount<S: State = Empty>(PhantomData<fn() -> S>);
862862- impl<S: State> sealed::Sealed for SetCount<S> {}
863863- impl<S: State> State for SetCount<S> {
864856 type Subject = S::Subject;
857857+ type Reason = Set<members::reason>;
865858 type Actors = S::Actors;
859859+ }
860860+ ///State transition - sets the `actors` field to Set
861861+ pub struct SetActors<S: State = Empty>(PhantomData<fn() -> S>);
862862+ impl<S: State> sealed::Sealed for SetActors<S> {}
863863+ impl<S: State> State for SetActors<S> {
866864 type MostRecentAt = S::MostRecentAt;
865865+ type Count = S::Count;
866866+ type Subject = S::Subject;
867867 type Reason = S::Reason;
868868- type Count = Set<members::count>;
868868+ type Actors = Set<members::actors>;
869869 }
870870 /// Marker types for field names
871871 #[allow(non_camel_case_types)]
872872 pub mod members {
873873- ///Marker type for the `subject` field
874874- pub struct subject(());
875875- ///Marker type for the `actors` field
876876- pub struct actors(());
877873 ///Marker type for the `most_recent_at` field
878874 pub struct most_recent_at(());
875875+ ///Marker type for the `count` field
876876+ pub struct count(());
877877+ ///Marker type for the `subject` field
878878+ pub struct subject(());
879879 ///Marker type for the `reason` field
880880 pub struct reason(());
881881- ///Marker type for the `count` field
882882- pub struct count(());
881881+ ///Marker type for the `actors` field
882882+ pub struct actors(());
883883 }
884884}
885885···10261026impl<'a, S> NotificationGroupBuilder<'a, S>
10271027where
10281028 S: notification_group_state::State,
10291029- S::Subject: notification_group_state::IsSet,
10301030- S::Actors: notification_group_state::IsSet,
10311029 S::MostRecentAt: notification_group_state::IsSet,
10321032- S::Reason: notification_group_state::IsSet,
10331030 S::Count: notification_group_state::IsSet,
10311031+ S::Subject: notification_group_state::IsSet,
10321032+ S::Reason: notification_group_state::IsSet,
10331033+ S::Actors: notification_group_state::IsSet,
10341034{
10351035 /// Build the final struct
10361036 pub fn build(self) -> NotificationGroup<'a> {
···12921292 }
12931293 /// State trait tracking which required fields have been set
12941294 pub trait State: sealed::Sealed {
12951295- type NewEntries;
12961295 type UpdatedAt;
12961296+ type NewEntries;
12971297 type Notebook;
12981298 }
12991299 /// Empty state - all required fields are unset
13001300 pub struct Empty(());
13011301 impl sealed::Sealed for Empty {}
13021302 impl State for Empty {
13031303- type NewEntries = Unset;
13041303 type UpdatedAt = Unset;
13041304+ type NewEntries = Unset;
13051305 type Notebook = Unset;
13061306 }
13071307+ ///State transition - sets the `updated_at` field to Set
13081308+ pub struct SetUpdatedAt<S: State = Empty>(PhantomData<fn() -> S>);
13091309+ impl<S: State> sealed::Sealed for SetUpdatedAt<S> {}
13101310+ impl<S: State> State for SetUpdatedAt<S> {
13111311+ type UpdatedAt = Set<members::updated_at>;
13121312+ type NewEntries = S::NewEntries;
13131313+ type Notebook = S::Notebook;
13141314+ }
13071315 ///State transition - sets the `new_entries` field to Set
13081316 pub struct SetNewEntries<S: State = Empty>(PhantomData<fn() -> S>);
13091317 impl<S: State> sealed::Sealed for SetNewEntries<S> {}
13101318 impl<S: State> State for SetNewEntries<S> {
13111311- type NewEntries = Set<members::new_entries>;
13121319 type UpdatedAt = S::UpdatedAt;
13131313- type Notebook = S::Notebook;
13141314- }
13151315- ///State transition - sets the `updated_at` field to Set
13161316- pub struct SetUpdatedAt<S: State = Empty>(PhantomData<fn() -> S>);
13171317- impl<S: State> sealed::Sealed for SetUpdatedAt<S> {}
13181318- impl<S: State> State for SetUpdatedAt<S> {
13191319- type NewEntries = S::NewEntries;
13201320- type UpdatedAt = Set<members::updated_at>;
13201320+ type NewEntries = Set<members::new_entries>;
13211321 type Notebook = S::Notebook;
13221322 }
13231323 ///State transition - sets the `notebook` field to Set
13241324 pub struct SetNotebook<S: State = Empty>(PhantomData<fn() -> S>);
13251325 impl<S: State> sealed::Sealed for SetNotebook<S> {}
13261326 impl<S: State> State for SetNotebook<S> {
13271327- type NewEntries = S::NewEntries;
13281327 type UpdatedAt = S::UpdatedAt;
13281328+ type NewEntries = S::NewEntries;
13291329 type Notebook = Set<members::notebook>;
13301330 }
13311331 /// Marker types for field names
13321332 #[allow(non_camel_case_types)]
13331333 pub mod members {
13341334- ///Marker type for the `new_entries` field
13351335- pub struct new_entries(());
13361334 ///Marker type for the `updated_at` field
13371335 pub struct updated_at(());
13361336+ ///Marker type for the `new_entries` field
13371337+ pub struct new_entries(());
13381338 ///Marker type for the `notebook` field
13391339 pub struct notebook(());
13401340 }
···14611461impl<'a, S> SubscriptionUpdateViewBuilder<'a, S>
14621462where
14631463 S: subscription_update_view_state::State,
14641464- S::NewEntries: subscription_update_view_state::IsSet,
14651464 S::UpdatedAt: subscription_update_view_state::IsSet,
14651465+ S::NewEntries: subscription_update_view_state::IsSet,
14661466 S::Notebook: subscription_update_view_state::IsSet,
14671467{
14681468 /// Build the final struct
+1
crates/weaver-api/src/site_standard.rs
···44// Any manual changes will be overwritten on the next regeneration.
5566pub mod document;
77+pub mod graph;
78pub mod publication;
89pub mod theme;
+349-244
crates/weaver-api/src/site_standard/document.rs
···55// This file was automatically generated from Lexicon schemas.
66// Any manual changes will be overwritten on the next regeneration.
7788+/// A document record representing a published article, blog post, or other content. Documents can belong to a publication or exist independently.
89#[jacquard_derive::lexicon]
910#[derive(
1011 serde::Serialize,
···1718)]
1819#[serde(rename_all = "camelCase")]
1920pub struct Document<'a> {
2121+ /// Strong reference to a Bluesky post. Useful to keep track of comments off-platform.
2022 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2123 #[serde(borrow)]
2224 pub bsky_post_ref: std::option::Option<
2325 crate::com_atproto::repo::strong_ref::StrongRef<'a>,
2426 >,
2727+ /// Open union used to define the record's content. Each entry must specify a $type and may be extended with other lexicons to support additional content formats.
2528 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2629 #[serde(borrow)]
2727- pub content: std::option::Option<Vec<jacquard_common::types::value::Data<'a>>>,
3030+ pub content: std::option::Option<jacquard_common::types::value::Data<'a>>,
3131+ /// Image to used for thumbnail or cover image. Less than 1MB is size.
2832 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2933 #[serde(borrow)]
3034 pub cover_image: std::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
3535+ /// A brief description or excerpt from the document.
3136 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3237 #[serde(borrow)]
3338 pub description: std::option::Option<jacquard_common::CowStr<'a>>,
3434- /// combined with the publications url to construct a full url to the document
3939+ /// Combine with site or publication url to construct a canonical URL to the document. Prepend with a leading slash.
3540 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3641 #[serde(borrow)]
3742 pub path: std::option::Option<jacquard_common::CowStr<'a>>,
4343+ /// Timestamp of the documents publish time.
4444+ pub published_at: jacquard_common::types::string::Datetime,
4545+ /// Points to a publication record (at://) or a publication url (https://) for loose documents. Avoid trailing slashes.
3846 #[serde(borrow)]
3939- pub publication: jacquard_common::types::string::AtUri<'a>,
4040- pub published_at: jacquard_common::types::string::Datetime,
4747+ pub site: jacquard_common::types::string::Uri<'a>,
4848+ /// Array of strings used to tag or categorize the document. Avoid prepending tags with hashtags.
4149 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4250 #[serde(borrow)]
4351 pub tags: std::option::Option<Vec<jacquard_common::CowStr<'a>>>,
5252+ /// Plaintext representation of the documents contents. Should not contain markdown or other formatting.
4453 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4554 #[serde(borrow)]
4655 pub text_content: std::option::Option<jacquard_common::CowStr<'a>>,
5656+ /// Title of the document.
4757 #[serde(borrow)]
4858 pub title: jacquard_common::CowStr<'a>,
5959+ /// Timestamp of the documents last edit.
4960 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5061 pub updated_at: std::option::Option<jacquard_common::types::string::Datetime>,
5162}
···6172 /// State trait tracking which required fields have been set
6273 pub trait State: sealed::Sealed {
6374 type PublishedAt;
6464- type Publication;
7575+ type Site;
6576 type Title;
6677 }
6778 /// Empty state - all required fields are unset
···6980 impl sealed::Sealed for Empty {}
7081 impl State for Empty {
7182 type PublishedAt = Unset;
7272- type Publication = Unset;
8383+ type Site = Unset;
7384 type Title = Unset;
7485 }
7586 ///State transition - sets the `published_at` field to Set
···7788 impl<S: State> sealed::Sealed for SetPublishedAt<S> {}
7889 impl<S: State> State for SetPublishedAt<S> {
7990 type PublishedAt = Set<members::published_at>;
8080- type Publication = S::Publication;
9191+ type Site = S::Site;
8192 type Title = S::Title;
8293 }
8383- ///State transition - sets the `publication` field to Set
8484- pub struct SetPublication<S: State = Empty>(PhantomData<fn() -> S>);
8585- impl<S: State> sealed::Sealed for SetPublication<S> {}
8686- impl<S: State> State for SetPublication<S> {
9494+ ///State transition - sets the `site` field to Set
9595+ pub struct SetSite<S: State = Empty>(PhantomData<fn() -> S>);
9696+ impl<S: State> sealed::Sealed for SetSite<S> {}
9797+ impl<S: State> State for SetSite<S> {
8798 type PublishedAt = S::PublishedAt;
8888- type Publication = Set<members::publication>;
9999+ type Site = Set<members::site>;
89100 type Title = S::Title;
90101 }
91102 ///State transition - sets the `title` field to Set
···93104 impl<S: State> sealed::Sealed for SetTitle<S> {}
94105 impl<S: State> State for SetTitle<S> {
95106 type PublishedAt = S::PublishedAt;
9696- type Publication = S::Publication;
107107+ type Site = S::Site;
97108 type Title = Set<members::title>;
98109 }
99110 /// Marker types for field names
···101112 pub mod members {
102113 ///Marker type for the `published_at` field
103114 pub struct published_at(());
104104- ///Marker type for the `publication` field
105105- pub struct publication(());
115115+ ///Marker type for the `site` field
116116+ pub struct site(());
106117 ///Marker type for the `title` field
107118 pub struct title(());
108119 }
···113124 _phantom_state: ::core::marker::PhantomData<fn() -> S>,
114125 __unsafe_private_named: (
115126 ::core::option::Option<crate::com_atproto::repo::strong_ref::StrongRef<'a>>,
116116- ::core::option::Option<Vec<jacquard_common::types::value::Data<'a>>>,
127127+ ::core::option::Option<jacquard_common::types::value::Data<'a>>,
117128 ::core::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
118129 ::core::option::Option<jacquard_common::CowStr<'a>>,
119130 ::core::option::Option<jacquard_common::CowStr<'a>>,
120120- ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
121131 ::core::option::Option<jacquard_common::types::string::Datetime>,
132132+ ::core::option::Option<jacquard_common::types::string::Uri<'a>>,
122133 ::core::option::Option<Vec<jacquard_common::CowStr<'a>>>,
123134 ::core::option::Option<jacquard_common::CowStr<'a>>,
124135 ::core::option::Option<jacquard_common::CowStr<'a>>,
···180191 /// Set the `content` field (optional)
181192 pub fn content(
182193 mut self,
183183- value: impl Into<Option<Vec<jacquard_common::types::value::Data<'a>>>>,
194194+ value: impl Into<Option<jacquard_common::types::value::Data<'a>>>,
184195 ) -> Self {
185196 self.__unsafe_private_named.1 = value.into();
186197 self
···188199 /// Set the `content` field to an Option value (optional)
189200 pub fn maybe_content(
190201 mut self,
191191- value: Option<Vec<jacquard_common::types::value::Data<'a>>>,
202202+ value: Option<jacquard_common::types::value::Data<'a>>,
192203 ) -> Self {
193204 self.__unsafe_private_named.1 = value;
194205 self
···252263impl<'a, S> DocumentBuilder<'a, S>
253264where
254265 S: document_state::State,
255255- S::Publication: document_state::IsUnset,
266266+ S::PublishedAt: document_state::IsUnset,
256267{
257257- /// Set the `publication` field (required)
258258- pub fn publication(
268268+ /// Set the `publishedAt` field (required)
269269+ pub fn published_at(
259270 mut self,
260260- value: impl Into<jacquard_common::types::string::AtUri<'a>>,
261261- ) -> DocumentBuilder<'a, document_state::SetPublication<S>> {
271271+ value: impl Into<jacquard_common::types::string::Datetime>,
272272+ ) -> DocumentBuilder<'a, document_state::SetPublishedAt<S>> {
262273 self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into());
263274 DocumentBuilder {
264275 _phantom_state: ::core::marker::PhantomData,
···271282impl<'a, S> DocumentBuilder<'a, S>
272283where
273284 S: document_state::State,
274274- S::PublishedAt: document_state::IsUnset,
285285+ S::Site: document_state::IsUnset,
275286{
276276- /// Set the `publishedAt` field (required)
277277- pub fn published_at(
287287+ /// Set the `site` field (required)
288288+ pub fn site(
278289 mut self,
279279- value: impl Into<jacquard_common::types::string::Datetime>,
280280- ) -> DocumentBuilder<'a, document_state::SetPublishedAt<S>> {
290290+ value: impl Into<jacquard_common::types::string::Uri<'a>>,
291291+ ) -> DocumentBuilder<'a, document_state::SetSite<S>> {
281292 self.__unsafe_private_named.6 = ::core::option::Option::Some(value.into());
282293 DocumentBuilder {
283294 _phantom_state: ::core::marker::PhantomData,
···367378where
368379 S: document_state::State,
369380 S::PublishedAt: document_state::IsSet,
370370- S::Publication: document_state::IsSet,
381381+ S::Site: document_state::IsSet,
371382 S::Title: document_state::IsSet,
372383{
373384 /// Build the final struct
···378389 cover_image: self.__unsafe_private_named.2,
379390 description: self.__unsafe_private_named.3,
380391 path: self.__unsafe_private_named.4,
381381- publication: self.__unsafe_private_named.5.unwrap(),
382382- published_at: self.__unsafe_private_named.6.unwrap(),
392392+ published_at: self.__unsafe_private_named.5.unwrap(),
393393+ site: self.__unsafe_private_named.6.unwrap(),
383394 tags: self.__unsafe_private_named.7,
384395 text_content: self.__unsafe_private_named.8,
385396 title: self.__unsafe_private_named.9.unwrap(),
···401412 cover_image: self.__unsafe_private_named.2,
402413 description: self.__unsafe_private_named.3,
403414 path: self.__unsafe_private_named.4,
404404- publication: self.__unsafe_private_named.5.unwrap(),
405405- published_at: self.__unsafe_private_named.6.unwrap(),
415415+ published_at: self.__unsafe_private_named.5.unwrap(),
416416+ site: self.__unsafe_private_named.6.unwrap(),
406417 tags: self.__unsafe_private_named.7,
407418 text_content: self.__unsafe_private_named.8,
408419 title: self.__unsafe_private_named.9.unwrap(),
···412423 }
413424}
414425415415-fn lexicon_doc_site_standard_document() -> ::jacquard_lexicon::lexicon::LexiconDoc<
416416- 'static,
417417-> {
418418- ::jacquard_lexicon::lexicon::LexiconDoc {
419419- lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
420420- id: ::jacquard_common::CowStr::new_static("site.standard.document"),
421421- revision: None,
422422- description: None,
423423- defs: {
424424- let mut map = ::alloc::collections::BTreeMap::new();
425425- map.insert(
426426- ::jacquard_common::smol_str::SmolStr::new_static("main"),
427427- ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
428428- description: None,
429429- required: Some(
430430- vec![
431431- ::jacquard_common::smol_str::SmolStr::new_static("publication"),
432432- ::jacquard_common::smol_str::SmolStr::new_static("title"),
433433- ::jacquard_common::smol_str::SmolStr::new_static("publishedAt")
434434- ],
435435- ),
436436- nullable: None,
437437- properties: {
438438- #[allow(unused_mut)]
439439- let mut map = ::alloc::collections::BTreeMap::new();
440440- map.insert(
441441- ::jacquard_common::smol_str::SmolStr::new_static(
442442- "bskyPostRef",
443443- ),
444444- ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
445445- description: None,
446446- r#ref: ::jacquard_common::CowStr::new_static(
447447- "com.atproto.repo.strongRef",
448448- ),
449449- }),
450450- );
451451- map.insert(
452452- ::jacquard_common::smol_str::SmolStr::new_static("content"),
453453- ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
454454- description: None,
455455- items: ::jacquard_lexicon::lexicon::LexArrayItem::Union(::jacquard_lexicon::lexicon::LexRefUnion {
456456- description: None,
457457- refs: vec![],
458458- closed: Some(false),
459459- }),
460460- min_length: None,
461461- max_length: None,
462462- }),
463463- );
464464- map.insert(
465465- ::jacquard_common::smol_str::SmolStr::new_static(
466466- "coverImage",
467467- ),
468468- ::jacquard_lexicon::lexicon::LexObjectProperty::Blob(::jacquard_lexicon::lexicon::LexBlob {
469469- description: None,
470470- accept: None,
471471- max_size: None,
472472- }),
473473- );
474474- map.insert(
475475- ::jacquard_common::smol_str::SmolStr::new_static(
476476- "description",
477477- ),
478478- ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
479479- description: None,
480480- format: None,
481481- default: None,
482482- min_length: None,
483483- max_length: Some(3000usize),
484484- min_graphemes: None,
485485- max_graphemes: Some(300usize),
486486- r#enum: None,
487487- r#const: None,
488488- known_values: None,
489489- }),
490490- );
491491- map.insert(
492492- ::jacquard_common::smol_str::SmolStr::new_static("path"),
493493- ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
494494- description: Some(
495495- ::jacquard_common::CowStr::new_static(
496496- "combined with the publications url to construct a full url to the document",
497497- ),
498498- ),
499499- format: None,
500500- default: None,
501501- min_length: None,
502502- max_length: None,
503503- min_graphemes: None,
504504- max_graphemes: None,
505505- r#enum: None,
506506- r#const: None,
507507- known_values: None,
508508- }),
509509- );
510510- map.insert(
511511- ::jacquard_common::smol_str::SmolStr::new_static(
512512- "publication",
513513- ),
514514- ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
515515- description: None,
516516- format: Some(
517517- ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
518518- ),
519519- default: None,
520520- min_length: None,
521521- max_length: None,
522522- min_graphemes: None,
523523- max_graphemes: None,
524524- r#enum: None,
525525- r#const: None,
526526- known_values: None,
527527- }),
528528- );
529529- map.insert(
530530- ::jacquard_common::smol_str::SmolStr::new_static(
531531- "publishedAt",
532532- ),
533533- ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
534534- description: None,
535535- format: Some(
536536- ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
537537- ),
538538- default: None,
539539- min_length: None,
540540- max_length: None,
541541- min_graphemes: None,
542542- max_graphemes: None,
543543- r#enum: None,
544544- r#const: None,
545545- known_values: None,
546546- }),
547547- );
548548- map.insert(
549549- ::jacquard_common::smol_str::SmolStr::new_static("tags"),
550550- ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
551551- description: None,
552552- items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString {
553553- description: None,
554554- format: None,
555555- default: None,
556556- min_length: None,
557557- max_length: Some(100usize),
558558- min_graphemes: None,
559559- max_graphemes: Some(50usize),
560560- r#enum: None,
561561- r#const: None,
562562- known_values: None,
563563- }),
564564- min_length: None,
565565- max_length: None,
566566- }),
567567- );
568568- map.insert(
569569- ::jacquard_common::smol_str::SmolStr::new_static(
570570- "textContent",
571571- ),
572572- ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
573573- description: None,
574574- format: None,
575575- default: None,
576576- min_length: None,
577577- max_length: None,
578578- min_graphemes: None,
579579- max_graphemes: None,
580580- r#enum: None,
581581- r#const: None,
582582- known_values: None,
583583- }),
584584- );
585585- map.insert(
586586- ::jacquard_common::smol_str::SmolStr::new_static("title"),
587587- ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
588588- description: None,
589589- format: None,
590590- default: None,
591591- min_length: None,
592592- max_length: Some(1280usize),
593593- min_graphemes: None,
594594- max_graphemes: Some(128usize),
595595- r#enum: None,
596596- r#const: None,
597597- known_values: None,
598598- }),
599599- );
600600- map.insert(
601601- ::jacquard_common::smol_str::SmolStr::new_static(
602602- "updatedAt",
603603- ),
604604- ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
605605- description: None,
606606- format: Some(
607607- ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
608608- ),
609609- default: None,
610610- min_length: None,
611611- max_length: None,
612612- min_graphemes: None,
613613- max_graphemes: None,
614614- r#enum: None,
615615- r#const: None,
616616- known_values: None,
617617- }),
618618- );
619619- map
620620- },
621621- }),
622622- );
623623- map
624624- },
426426+impl<'a> Document<'a> {
427427+ pub fn uri(
428428+ uri: impl Into<jacquard_common::CowStr<'a>>,
429429+ ) -> Result<
430430+ jacquard_common::types::uri::RecordUri<'a, DocumentRecord>,
431431+ jacquard_common::types::uri::UriError,
432432+ > {
433433+ jacquard_common::types::uri::RecordUri::try_from_uri(
434434+ jacquard_common::types::string::AtUri::new_cow(uri.into())?,
435435+ )
436436+ }
437437+}
438438+439439+/// Typed wrapper for GetRecord response with this collection's record type.
440440+#[derive(
441441+ serde::Serialize,
442442+ serde::Deserialize,
443443+ Debug,
444444+ Clone,
445445+ PartialEq,
446446+ Eq,
447447+ jacquard_derive::IntoStatic
448448+)]
449449+#[serde(rename_all = "camelCase")]
450450+pub struct DocumentGetRecordOutput<'a> {
451451+ #[serde(skip_serializing_if = "std::option::Option::is_none")]
452452+ #[serde(borrow)]
453453+ pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
454454+ #[serde(borrow)]
455455+ pub uri: jacquard_common::types::string::AtUri<'a>,
456456+ #[serde(borrow)]
457457+ pub value: Document<'a>,
458458+}
459459+460460+impl From<DocumentGetRecordOutput<'_>> for Document<'_> {
461461+ fn from(output: DocumentGetRecordOutput<'_>) -> Self {
462462+ use jacquard_common::IntoStatic;
463463+ output.value.into_static()
625464 }
465465+}
466466+467467+impl jacquard_common::types::collection::Collection for Document<'_> {
468468+ const NSID: &'static str = "site.standard.document";
469469+ type Record = DocumentRecord;
470470+}
471471+472472+/// Marker type for deserializing records from this collection.
473473+#[derive(Debug, serde::Serialize, serde::Deserialize)]
474474+pub struct DocumentRecord;
475475+impl jacquard_common::xrpc::XrpcResp for DocumentRecord {
476476+ const NSID: &'static str = "site.standard.document";
477477+ const ENCODING: &'static str = "application/json";
478478+ type Output<'de> = DocumentGetRecordOutput<'de>;
479479+ type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
480480+}
481481+482482+impl jacquard_common::types::collection::Collection for DocumentRecord {
483483+ const NSID: &'static str = "site.standard.document";
484484+ type Record = DocumentRecord;
626485}
627486628487impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Document<'a> {
···701560 }
702561 }
703562 Ok(())
563563+ }
564564+}
565565+566566+fn lexicon_doc_site_standard_document() -> ::jacquard_lexicon::lexicon::LexiconDoc<
567567+ 'static,
568568+> {
569569+ ::jacquard_lexicon::lexicon::LexiconDoc {
570570+ lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
571571+ id: ::jacquard_common::CowStr::new_static("site.standard.document"),
572572+ revision: None,
573573+ description: None,
574574+ defs: {
575575+ let mut map = ::alloc::collections::BTreeMap::new();
576576+ map.insert(
577577+ ::jacquard_common::smol_str::SmolStr::new_static("main"),
578578+ ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord {
579579+ description: Some(
580580+ ::jacquard_common::CowStr::new_static(
581581+ "A document record representing a published article, blog post, or other content. Documents can belong to a publication or exist independently.",
582582+ ),
583583+ ),
584584+ key: Some(::jacquard_common::CowStr::new_static("tid")),
585585+ record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject {
586586+ description: None,
587587+ required: Some(
588588+ vec![
589589+ ::jacquard_common::smol_str::SmolStr::new_static("site"),
590590+ ::jacquard_common::smol_str::SmolStr::new_static("title"),
591591+ ::jacquard_common::smol_str::SmolStr::new_static("publishedAt")
592592+ ],
593593+ ),
594594+ nullable: None,
595595+ properties: {
596596+ #[allow(unused_mut)]
597597+ let mut map = ::alloc::collections::BTreeMap::new();
598598+ map.insert(
599599+ ::jacquard_common::smol_str::SmolStr::new_static(
600600+ "bskyPostRef",
601601+ ),
602602+ ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
603603+ description: None,
604604+ r#ref: ::jacquard_common::CowStr::new_static(
605605+ "com.atproto.repo.strongRef",
606606+ ),
607607+ }),
608608+ );
609609+ map.insert(
610610+ ::jacquard_common::smol_str::SmolStr::new_static("content"),
611611+ ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion {
612612+ description: Some(
613613+ ::jacquard_common::CowStr::new_static(
614614+ "Open union used to define the record's content. Each entry must specify a $type and may be extended with other lexicons to support additional content formats.",
615615+ ),
616616+ ),
617617+ refs: vec![],
618618+ closed: Some(false),
619619+ }),
620620+ );
621621+ map.insert(
622622+ ::jacquard_common::smol_str::SmolStr::new_static(
623623+ "coverImage",
624624+ ),
625625+ ::jacquard_lexicon::lexicon::LexObjectProperty::Blob(::jacquard_lexicon::lexicon::LexBlob {
626626+ description: None,
627627+ accept: None,
628628+ max_size: None,
629629+ }),
630630+ );
631631+ map.insert(
632632+ ::jacquard_common::smol_str::SmolStr::new_static(
633633+ "description",
634634+ ),
635635+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
636636+ description: Some(
637637+ ::jacquard_common::CowStr::new_static(
638638+ "A brief description or excerpt from the document.",
639639+ ),
640640+ ),
641641+ format: None,
642642+ default: None,
643643+ min_length: None,
644644+ max_length: Some(3000usize),
645645+ min_graphemes: None,
646646+ max_graphemes: Some(300usize),
647647+ r#enum: None,
648648+ r#const: None,
649649+ known_values: None,
650650+ }),
651651+ );
652652+ map.insert(
653653+ ::jacquard_common::smol_str::SmolStr::new_static("path"),
654654+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
655655+ description: Some(
656656+ ::jacquard_common::CowStr::new_static(
657657+ "Combine with site or publication url to construct a canonical URL to the document. Prepend with a leading slash.",
658658+ ),
659659+ ),
660660+ format: None,
661661+ default: None,
662662+ min_length: None,
663663+ max_length: None,
664664+ min_graphemes: None,
665665+ max_graphemes: None,
666666+ r#enum: None,
667667+ r#const: None,
668668+ known_values: None,
669669+ }),
670670+ );
671671+ map.insert(
672672+ ::jacquard_common::smol_str::SmolStr::new_static(
673673+ "publishedAt",
674674+ ),
675675+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
676676+ description: Some(
677677+ ::jacquard_common::CowStr::new_static(
678678+ "Timestamp of the documents publish time.",
679679+ ),
680680+ ),
681681+ format: Some(
682682+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
683683+ ),
684684+ default: None,
685685+ min_length: None,
686686+ max_length: None,
687687+ min_graphemes: None,
688688+ max_graphemes: None,
689689+ r#enum: None,
690690+ r#const: None,
691691+ known_values: None,
692692+ }),
693693+ );
694694+ map.insert(
695695+ ::jacquard_common::smol_str::SmolStr::new_static("site"),
696696+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
697697+ description: Some(
698698+ ::jacquard_common::CowStr::new_static(
699699+ "Points to a publication record (at://) or a publication url (https://) for loose documents. Avoid trailing slashes.",
700700+ ),
701701+ ),
702702+ format: Some(
703703+ ::jacquard_lexicon::lexicon::LexStringFormat::Uri,
704704+ ),
705705+ default: None,
706706+ min_length: None,
707707+ max_length: None,
708708+ min_graphemes: None,
709709+ max_graphemes: None,
710710+ r#enum: None,
711711+ r#const: None,
712712+ known_values: None,
713713+ }),
714714+ );
715715+ map.insert(
716716+ ::jacquard_common::smol_str::SmolStr::new_static("tags"),
717717+ ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
718718+ description: Some(
719719+ ::jacquard_common::CowStr::new_static(
720720+ "Array of strings used to tag or categorize the document. Avoid prepending tags with hashtags.",
721721+ ),
722722+ ),
723723+ items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString {
724724+ description: None,
725725+ format: None,
726726+ default: None,
727727+ min_length: None,
728728+ max_length: Some(100usize),
729729+ min_graphemes: None,
730730+ max_graphemes: Some(50usize),
731731+ r#enum: None,
732732+ r#const: None,
733733+ known_values: None,
734734+ }),
735735+ min_length: None,
736736+ max_length: None,
737737+ }),
738738+ );
739739+ map.insert(
740740+ ::jacquard_common::smol_str::SmolStr::new_static(
741741+ "textContent",
742742+ ),
743743+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
744744+ description: Some(
745745+ ::jacquard_common::CowStr::new_static(
746746+ "Plaintext representation of the documents contents. Should not contain markdown or other formatting.",
747747+ ),
748748+ ),
749749+ format: None,
750750+ default: None,
751751+ min_length: None,
752752+ max_length: None,
753753+ min_graphemes: None,
754754+ max_graphemes: None,
755755+ r#enum: None,
756756+ r#const: None,
757757+ known_values: None,
758758+ }),
759759+ );
760760+ map.insert(
761761+ ::jacquard_common::smol_str::SmolStr::new_static("title"),
762762+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
763763+ description: Some(
764764+ ::jacquard_common::CowStr::new_static(
765765+ "Title of the document.",
766766+ ),
767767+ ),
768768+ format: None,
769769+ default: None,
770770+ min_length: None,
771771+ max_length: Some(1280usize),
772772+ min_graphemes: None,
773773+ max_graphemes: Some(128usize),
774774+ r#enum: None,
775775+ r#const: None,
776776+ known_values: None,
777777+ }),
778778+ );
779779+ map.insert(
780780+ ::jacquard_common::smol_str::SmolStr::new_static(
781781+ "updatedAt",
782782+ ),
783783+ ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
784784+ description: Some(
785785+ ::jacquard_common::CowStr::new_static(
786786+ "Timestamp of the documents last edit.",
787787+ ),
788788+ ),
789789+ format: Some(
790790+ ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
791791+ ),
792792+ default: None,
793793+ min_length: None,
794794+ max_length: None,
795795+ min_graphemes: None,
796796+ max_graphemes: None,
797797+ r#enum: None,
798798+ r#const: None,
799799+ known_values: None,
800800+ }),
801801+ );
802802+ map
803803+ },
804804+ }),
805805+ }),
806806+ );
807807+ map
808808+ },
704809 }
705810}
+6
crates/weaver-api/src/site_standard/graph.rs
···11+// @generated by jacquard-lexicon. DO NOT EDIT.
22+//
33+// This file was automatically generated from Lexicon schemas.
44+// Any manual changes will be overwritten on the next regeneration.
55+66+pub mod subscription;
···55// This file was automatically generated from Lexicon schemas.
66// Any manual changes will be overwritten on the next regeneration.
7788+/// A simplified theme definition for publications, providing basic color customization for content display across different platforms and applications.
89#[jacquard_derive::lexicon]
910#[derive(
1011 serde::Serialize,
···1718)]
1819#[serde(rename_all = "camelCase")]
1920pub struct Basic<'a> {
2121+ /// Color used for links and button backgrounds.
2022 #[serde(borrow)]
2123 pub accent: crate::site_standard::theme::color::Rgb<'a>,
2424+ /// Color used for button text.
2225 #[serde(borrow)]
2326 pub accent_foreground: crate::site_standard::theme::color::Rgb<'a>,
2727+ /// Color used for content background.
2428 #[serde(borrow)]
2529 pub background: crate::site_standard::theme::color::Rgb<'a>,
3030+ /// Color used for content text.
2631 #[serde(borrow)]
2732 pub foreground: crate::site_standard::theme::color::Rgb<'a>,
2833}
···3742 }
3843 /// State trait tracking which required fields have been set
3944 pub trait State: sealed::Sealed {
4040- type AccentForeground;
4145 type Accent;
4246 type Background;
4747+ type AccentForeground;
4348 type Foreground;
4449 }
4550 /// Empty state - all required fields are unset
4651 pub struct Empty(());
4752 impl sealed::Sealed for Empty {}
4853 impl State for Empty {
4949- type AccentForeground = Unset;
5054 type Accent = Unset;
5155 type Background = Unset;
5656+ type AccentForeground = Unset;
5257 type Foreground = Unset;
5353- }
5454- ///State transition - sets the `accent_foreground` field to Set
5555- pub struct SetAccentForeground<S: State = Empty>(PhantomData<fn() -> S>);
5656- impl<S: State> sealed::Sealed for SetAccentForeground<S> {}
5757- impl<S: State> State for SetAccentForeground<S> {
5858- type AccentForeground = Set<members::accent_foreground>;
5959- type Accent = S::Accent;
6060- type Background = S::Background;
6161- type Foreground = S::Foreground;
6258 }
6359 ///State transition - sets the `accent` field to Set
6460 pub struct SetAccent<S: State = Empty>(PhantomData<fn() -> S>);
6561 impl<S: State> sealed::Sealed for SetAccent<S> {}
6662 impl<S: State> State for SetAccent<S> {
6767- type AccentForeground = S::AccentForeground;
6863 type Accent = Set<members::accent>;
6964 type Background = S::Background;
6565+ type AccentForeground = S::AccentForeground;
7066 type Foreground = S::Foreground;
7167 }
7268 ///State transition - sets the `background` field to Set
7369 pub struct SetBackground<S: State = Empty>(PhantomData<fn() -> S>);
7470 impl<S: State> sealed::Sealed for SetBackground<S> {}
7571 impl<S: State> State for SetBackground<S> {
7272+ type Accent = S::Accent;
7373+ type Background = Set<members::background>;
7674 type AccentForeground = S::AccentForeground;
7575+ type Foreground = S::Foreground;
7676+ }
7777+ ///State transition - sets the `accent_foreground` field to Set
7878+ pub struct SetAccentForeground<S: State = Empty>(PhantomData<fn() -> S>);
7979+ impl<S: State> sealed::Sealed for SetAccentForeground<S> {}
8080+ impl<S: State> State for SetAccentForeground<S> {
7781 type Accent = S::Accent;
7878- type Background = Set<members::background>;
8282+ type Background = S::Background;
8383+ type AccentForeground = Set<members::accent_foreground>;
7984 type Foreground = S::Foreground;
8085 }
8186 ///State transition - sets the `foreground` field to Set
8287 pub struct SetForeground<S: State = Empty>(PhantomData<fn() -> S>);
8388 impl<S: State> sealed::Sealed for SetForeground<S> {}
8489 impl<S: State> State for SetForeground<S> {
8585- type AccentForeground = S::AccentForeground;
8690 type Accent = S::Accent;
8791 type Background = S::Background;
9292+ type AccentForeground = S::AccentForeground;
8893 type Foreground = Set<members::foreground>;
8994 }
9095 /// Marker types for field names
9196 #[allow(non_camel_case_types)]
9297 pub mod members {
9393- ///Marker type for the `accent_foreground` field
9494- pub struct accent_foreground(());
9598 ///Marker type for the `accent` field
9699 pub struct accent(());
97100 ///Marker type for the `background` field
98101 pub struct background(());
102102+ ///Marker type for the `accent_foreground` field
103103+ pub struct accent_foreground(());
99104 ///Marker type for the `foreground` field
100105 pub struct foreground(());
101106 }
···210215impl<'a, S> BasicBuilder<'a, S>
211216where
212217 S: basic_state::State,
213213- S::AccentForeground: basic_state::IsSet,
214218 S::Accent: basic_state::IsSet,
215219 S::Background: basic_state::IsSet,
220220+ S::AccentForeground: basic_state::IsSet,
216221 S::Foreground: basic_state::IsSet,
217222{
218223 /// Build the final struct
···256261 map.insert(
257262 ::jacquard_common::smol_str::SmolStr::new_static("main"),
258263 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
259259- description: None,
264264+ description: Some(
265265+ ::jacquard_common::CowStr::new_static(
266266+ "A simplified theme definition for publications, providing basic color customization for content display across different platforms and applications.",
267267+ ),
268268+ ),
260269 required: Some(
261270 vec![
262271 ::jacquard_common::smol_str::SmolStr::new_static("background"),
···272281 map.insert(
273282 ::jacquard_common::smol_str::SmolStr::new_static("accent"),
274283 ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion {
275275- description: None,
284284+ description: Some(
285285+ ::jacquard_common::CowStr::new_static(
286286+ "Color used for links and button backgrounds.",
287287+ ),
288288+ ),
276289 refs: vec![
277290 ::jacquard_common::CowStr::new_static("site.standard.theme.color#rgb")
278291 ],
···284297 "accentForeground",
285298 ),
286299 ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion {
287287- description: None,
300300+ description: Some(
301301+ ::jacquard_common::CowStr::new_static(
302302+ "Color used for button text.",
303303+ ),
304304+ ),
288305 refs: vec![
289306 ::jacquard_common::CowStr::new_static("site.standard.theme.color#rgb")
290307 ],
···296313 "background",
297314 ),
298315 ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion {
299299- description: None,
316316+ description: Some(
317317+ ::jacquard_common::CowStr::new_static(
318318+ "Color used for content background.",
319319+ ),
320320+ ),
300321 refs: vec![
301322 ::jacquard_common::CowStr::new_static("site.standard.theme.color#rgb")
302323 ],
···308329 "foreground",
309330 ),
310331 ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion {
311311- description: None,
332332+ description: Some(
333333+ ::jacquard_common::CowStr::new_static(
334334+ "Color used for content text.",
335335+ ),
336336+ ),
312337 refs: vec![
313338 ::jacquard_common::CowStr::new_static("site.standard.theme.color#rgb")
314339 ],
···3333 /// State trait tracking which required fields have been set
3434 pub trait State: sealed::Sealed {
3535 type G;
3636- type B;
3736 type R;
3737+ type B;
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 G = Unset;
4444- type B = Unset;
4544 type R = Unset;
4545+ type B = Unset;
4646 }
4747 ///State transition - sets the `g` field to Set
4848 pub struct SetG<S: State = Empty>(PhantomData<fn() -> S>);
4949 impl<S: State> sealed::Sealed for SetG<S> {}
5050 impl<S: State> State for SetG<S> {
5151 type G = Set<members::g>;
5252- type B = S::B;
5352 type R = S::R;
5454- }
5555- ///State transition - sets the `b` field to Set
5656- pub struct SetB<S: State = Empty>(PhantomData<fn() -> S>);
5757- impl<S: State> sealed::Sealed for SetB<S> {}
5858- impl<S: State> State for SetB<S> {
5959- type G = S::G;
6060- type B = Set<members::b>;
6161- type R = S::R;
5353+ type B = S::B;
6254 }
6355 ///State transition - sets the `r` field to Set
6456 pub struct SetR<S: State = Empty>(PhantomData<fn() -> S>);
6557 impl<S: State> sealed::Sealed for SetR<S> {}
6658 impl<S: State> State for SetR<S> {
6759 type G = S::G;
6868- type B = S::B;
6960 type R = Set<members::r>;
6161+ type B = S::B;
6262+ }
6363+ ///State transition - sets the `b` field to Set
6464+ pub struct SetB<S: State = Empty>(PhantomData<fn() -> S>);
6565+ impl<S: State> sealed::Sealed for SetB<S> {}
6666+ impl<S: State> State for SetB<S> {
6767+ type G = S::G;
6868+ type R = S::R;
6969+ type B = Set<members::b>;
7070 }
7171 /// Marker types for field names
7272 #[allow(non_camel_case_types)]
7373 pub mod members {
7474 ///Marker type for the `g` field
7575 pub struct g(());
7676+ ///Marker type for the `r` field
7777+ pub struct r(());
7678 ///Marker type for the `b` field
7779 pub struct b(());
7878- ///Marker type for the `r` field
7979- pub struct r(());
8080 }
8181}
8282···161161where
162162 S: rgb_state::State,
163163 S::G: rgb_state::IsSet,
164164- S::B: rgb_state::IsSet,
165164 S::R: rgb_state::IsSet,
165165+ S::B: rgb_state::IsSet,
166166{
167167 /// Build the final struct
168168 pub fn build(self) -> Rgb<'a> {
···439439 /// State trait tracking which required fields have been set
440440 pub trait State: sealed::Sealed {
441441 type G;
442442- type R;
443442 type A;
444443 type B;
444444+ type R;
445445 }
446446 /// Empty state - all required fields are unset
447447 pub struct Empty(());
448448 impl sealed::Sealed for Empty {}
449449 impl State for Empty {
450450 type G = Unset;
451451- type R = Unset;
452451 type A = Unset;
453452 type B = Unset;
453453+ type R = Unset;
454454 }
455455 ///State transition - sets the `g` field to Set
456456 pub struct SetG<S: State = Empty>(PhantomData<fn() -> S>);
457457 impl<S: State> sealed::Sealed for SetG<S> {}
458458 impl<S: State> State for SetG<S> {
459459 type G = Set<members::g>;
460460- type R = S::R;
461460 type A = S::A;
462461 type B = S::B;
463463- }
464464- ///State transition - sets the `r` field to Set
465465- pub struct SetR<S: State = Empty>(PhantomData<fn() -> S>);
466466- impl<S: State> sealed::Sealed for SetR<S> {}
467467- impl<S: State> State for SetR<S> {
468468- type G = S::G;
469469- type R = Set<members::r>;
470470- type A = S::A;
471471- type B = S::B;
462462+ type R = S::R;
472463 }
473464 ///State transition - sets the `a` field to Set
474465 pub struct SetA<S: State = Empty>(PhantomData<fn() -> S>);
475466 impl<S: State> sealed::Sealed for SetA<S> {}
476467 impl<S: State> State for SetA<S> {
477468 type G = S::G;
478478- type R = S::R;
479469 type A = Set<members::a>;
480470 type B = S::B;
471471+ type R = S::R;
481472 }
482473 ///State transition - sets the `b` field to Set
483474 pub struct SetB<S: State = Empty>(PhantomData<fn() -> S>);
484475 impl<S: State> sealed::Sealed for SetB<S> {}
485476 impl<S: State> State for SetB<S> {
486477 type G = S::G;
478478+ type A = S::A;
479479+ type B = Set<members::b>;
487480 type R = S::R;
481481+ }
482482+ ///State transition - sets the `r` field to Set
483483+ pub struct SetR<S: State = Empty>(PhantomData<fn() -> S>);
484484+ impl<S: State> sealed::Sealed for SetR<S> {}
485485+ impl<S: State> State for SetR<S> {
486486+ type G = S::G;
488487 type A = S::A;
489489- type B = Set<members::b>;
488488+ type B = S::B;
489489+ type R = Set<members::r>;
490490 }
491491 /// Marker types for field names
492492 #[allow(non_camel_case_types)]
493493 pub mod members {
494494 ///Marker type for the `g` field
495495 pub struct g(());
496496- ///Marker type for the `r` field
497497- pub struct r(());
498496 ///Marker type for the `a` field
499497 pub struct a(());
500498 ///Marker type for the `b` field
501499 pub struct b(());
500500+ ///Marker type for the `r` field
501501+ pub struct r(());
502502 }
503503}
504504···600600where
601601 S: rgba_state::State,
602602 S::G: rgba_state::IsSet,
603603- S::R: rgba_state::IsSet,
604603 S::A: rgba_state::IsSet,
605604 S::B: rgba_state::IsSet,
605605+ S::R: rgba_state::IsSet,
606606{
607607 /// Build the final struct
608608 pub fn build(self) -> Rgba<'a> {
···5555 }
5656 /// State trait tracking which required fields have been set
5757 pub trait State: sealed::Sealed {
5858- type ContentMarkdown;
5958 type Disabled;
6059 type LastUpdatedBy;
6060+ type Name;
6161 type CreatedAt;
6262- type Name;
6362 type UpdatedAt;
6463 type Id;
6464+ type ContentMarkdown;
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 ContentMarkdown = Unset;
7170 type Disabled = Unset;
7271 type LastUpdatedBy = Unset;
7272+ type Name = Unset;
7373 type CreatedAt = Unset;
7474- type Name = Unset;
7574 type UpdatedAt = Unset;
7675 type Id = 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 Disabled = S::Disabled;
8484- type LastUpdatedBy = S::LastUpdatedBy;
8585- type CreatedAt = S::CreatedAt;
8686- type Name = S::Name;
8787- type UpdatedAt = S::UpdatedAt;
8888- type Id = S::Id;
7676+ type ContentMarkdown = Unset;
8977 }
9078 ///State transition - sets the `disabled` field to Set
9179 pub struct SetDisabled<S: State = Empty>(PhantomData<fn() -> S>);
9280 impl<S: State> sealed::Sealed for SetDisabled<S> {}
9381 impl<S: State> State for SetDisabled<S> {
9494- type ContentMarkdown = S::ContentMarkdown;
9582 type Disabled = Set<members::disabled>;
9683 type LastUpdatedBy = S::LastUpdatedBy;
9797- type CreatedAt = S::CreatedAt;
9884 type Name = S::Name;
8585+ type CreatedAt = S::CreatedAt;
9986 type UpdatedAt = S::UpdatedAt;
10087 type Id = S::Id;
8888+ type ContentMarkdown = S::ContentMarkdown;
10189 }
10290 ///State transition - sets the `last_updated_by` field to Set
10391 pub struct SetLastUpdatedBy<S: State = Empty>(PhantomData<fn() -> S>);
10492 impl<S: State> sealed::Sealed for SetLastUpdatedBy<S> {}
10593 impl<S: State> State for SetLastUpdatedBy<S> {
106106- type ContentMarkdown = S::ContentMarkdown;
10794 type Disabled = S::Disabled;
10895 type LastUpdatedBy = Set<members::last_updated_by>;
109109- type CreatedAt = S::CreatedAt;
11096 type Name = S::Name;
9797+ type CreatedAt = S::CreatedAt;
11198 type UpdatedAt = S::UpdatedAt;
11299 type Id = S::Id;
113113- }
114114- ///State transition - sets the `created_at` field to Set
115115- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
116116- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
117117- impl<S: State> State for SetCreatedAt<S> {
118100 type ContentMarkdown = S::ContentMarkdown;
119119- type Disabled = S::Disabled;
120120- type LastUpdatedBy = S::LastUpdatedBy;
121121- type CreatedAt = Set<members::created_at>;
122122- type Name = S::Name;
123123- type UpdatedAt = S::UpdatedAt;
124124- type Id = S::Id;
125101 }
126102 ///State transition - sets the `name` field to Set
127103 pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
128104 impl<S: State> sealed::Sealed for SetName<S> {}
129105 impl<S: State> State for SetName<S> {
130130- type ContentMarkdown = S::ContentMarkdown;
131106 type Disabled = S::Disabled;
132107 type LastUpdatedBy = S::LastUpdatedBy;
133133- type CreatedAt = S::CreatedAt;
134108 type Name = Set<members::name>;
109109+ type CreatedAt = S::CreatedAt;
135110 type UpdatedAt = S::UpdatedAt;
136111 type Id = S::Id;
112112+ type ContentMarkdown = S::ContentMarkdown;
113113+ }
114114+ ///State transition - sets the `created_at` field to Set
115115+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
116116+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
117117+ impl<S: State> State for SetCreatedAt<S> {
118118+ type Disabled = S::Disabled;
119119+ type LastUpdatedBy = S::LastUpdatedBy;
120120+ type Name = S::Name;
121121+ type CreatedAt = Set<members::created_at>;
122122+ type UpdatedAt = S::UpdatedAt;
123123+ type Id = S::Id;
124124+ type ContentMarkdown = S::ContentMarkdown;
137125 }
138126 ///State transition - sets the `updated_at` field to Set
139127 pub struct SetUpdatedAt<S: State = Empty>(PhantomData<fn() -> S>);
140128 impl<S: State> sealed::Sealed for SetUpdatedAt<S> {}
141129 impl<S: State> State for SetUpdatedAt<S> {
142142- type ContentMarkdown = S::ContentMarkdown;
143130 type Disabled = S::Disabled;
144131 type LastUpdatedBy = S::LastUpdatedBy;
145145- type CreatedAt = S::CreatedAt;
146132 type Name = S::Name;
133133+ type CreatedAt = S::CreatedAt;
147134 type UpdatedAt = Set<members::updated_at>;
148135 type Id = S::Id;
136136+ type ContentMarkdown = S::ContentMarkdown;
149137 }
150138 ///State transition - sets the `id` field to Set
151139 pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
152140 impl<S: State> sealed::Sealed for SetId<S> {}
153141 impl<S: State> State for SetId<S> {
142142+ type Disabled = S::Disabled;
143143+ type LastUpdatedBy = S::LastUpdatedBy;
144144+ type Name = S::Name;
145145+ type CreatedAt = S::CreatedAt;
146146+ type UpdatedAt = S::UpdatedAt;
147147+ type Id = Set<members::id>;
154148 type ContentMarkdown = S::ContentMarkdown;
149149+ }
150150+ ///State transition - sets the `content_markdown` field to Set
151151+ pub struct SetContentMarkdown<S: State = Empty>(PhantomData<fn() -> S>);
152152+ impl<S: State> sealed::Sealed for SetContentMarkdown<S> {}
153153+ impl<S: State> State for SetContentMarkdown<S> {
155154 type Disabled = S::Disabled;
156155 type LastUpdatedBy = S::LastUpdatedBy;
156156+ type Name = S::Name;
157157 type CreatedAt = S::CreatedAt;
158158- type Name = S::Name;
159158 type UpdatedAt = S::UpdatedAt;
160160- type Id = Set<members::id>;
159159+ type Id = S::Id;
160160+ type ContentMarkdown = Set<members::content_markdown>;
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(());
167165 ///Marker type for the `disabled` field
168166 pub struct disabled(());
169167 ///Marker type for the `last_updated_by` field
170168 pub struct last_updated_by(());
171171- ///Marker type for the `created_at` field
172172- pub struct created_at(());
173169 ///Marker type for the `name` field
174170 pub struct name(());
171171+ ///Marker type for the `created_at` field
172172+ pub struct created_at(());
175173 ///Marker type for the `updated_at` field
176174 pub struct updated_at(());
177175 ///Marker type for the `id` field
178176 pub struct id(());
177177+ ///Marker type for the `content_markdown` field
178178+ pub struct content_markdown(());
179179 }
180180}
181181···395395impl<'a, S> TemplateViewBuilder<'a, S>
396396where
397397 S: template_view_state::State,
398398- S::ContentMarkdown: template_view_state::IsSet,
399398 S::Disabled: template_view_state::IsSet,
400399 S::LastUpdatedBy: template_view_state::IsSet,
401401- S::CreatedAt: template_view_state::IsSet,
402400 S::Name: template_view_state::IsSet,
401401+ S::CreatedAt: template_view_state::IsSet,
403402 S::UpdatedAt: template_view_state::IsSet,
404403 S::Id: template_view_state::IsSet,
404404+ S::ContentMarkdown: template_view_state::IsSet,
405405{
406406 /// Build the final struct
407407 pub fn build(self) -> TemplateView<'a> {
+487-487
crates/weaver-api/src/tools_ozone/moderation.rs
···53075307 }
53085308 /// State trait tracking which required fields have been set
53095309 pub trait State: sealed::Sealed {
53105310- type CreatedAt;
53115310 type Status;
53115311+ type CreatedAt;
53125312 type AttemptId;
53135313 }
53145314 /// Empty state - all required fields are unset
53155315 pub struct Empty(());
53165316 impl sealed::Sealed for Empty {}
53175317 impl State for Empty {
53185318- type CreatedAt = Unset;
53195318 type Status = Unset;
53195319+ type CreatedAt = Unset;
53205320 type AttemptId = Unset;
53215321 }
53225322- ///State transition - sets the `created_at` field to Set
53235323- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
53245324- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
53255325- impl<S: State> State for SetCreatedAt<S> {
53265326- type CreatedAt = Set<members::created_at>;
53275327- type Status = S::Status;
53285328- type AttemptId = S::AttemptId;
53295329- }
53305322 ///State transition - sets the `status` field to Set
53315323 pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
53325324 impl<S: State> sealed::Sealed for SetStatus<S> {}
53335325 impl<S: State> State for SetStatus<S> {
53345334- type CreatedAt = S::CreatedAt;
53355326 type Status = Set<members::status>;
53275327+ type CreatedAt = S::CreatedAt;
53285328+ type AttemptId = S::AttemptId;
53295329+ }
53305330+ ///State transition - sets the `created_at` field to Set
53315331+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
53325332+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
53335333+ impl<S: State> State for SetCreatedAt<S> {
53345334+ type Status = S::Status;
53355335+ type CreatedAt = Set<members::created_at>;
53365336 type AttemptId = S::AttemptId;
53375337 }
53385338 ///State transition - sets the `attempt_id` field to Set
53395339 pub struct SetAttemptId<S: State = Empty>(PhantomData<fn() -> S>);
53405340 impl<S: State> sealed::Sealed for SetAttemptId<S> {}
53415341 impl<S: State> State for SetAttemptId<S> {
53425342- type CreatedAt = S::CreatedAt;
53435342 type Status = S::Status;
53435343+ type CreatedAt = S::CreatedAt;
53445344 type AttemptId = Set<members::attempt_id>;
53455345 }
53465346 /// Marker types for field names
53475347 #[allow(non_camel_case_types)]
53485348 pub mod members {
53495349+ ///Marker type for the `status` field
53505350+ pub struct status(());
53495351 ///Marker type for the `created_at` field
53505352 pub struct created_at(());
53515351- ///Marker type for the `status` field
53525352- pub struct status(());
53535353 ///Marker type for the `attempt_id` field
53545354 pub struct attempt_id(());
53555355 }
···55895589impl<'a, S> AgeAssuranceEventBuilder<'a, S>
55905590where
55915591 S: age_assurance_event_state::State,
55925592- S::CreatedAt: age_assurance_event_state::IsSet,
55935592 S::Status: age_assurance_event_state::IsSet,
55935593+ S::CreatedAt: age_assurance_event_state::IsSet,
55945594 S::AttemptId: age_assurance_event_state::IsSet,
55955595{
55965596 /// Build the final struct
···59275927 /// State trait tracking which required fields have been set
59285928 pub trait State: sealed::Sealed {
59295929 type Size;
59305930- type MimeType;
59315930 type Cid;
59315931+ type MimeType;
59325932 type CreatedAt;
59335933 }
59345934 /// Empty state - all required fields are unset
···59365936 impl sealed::Sealed for Empty {}
59375937 impl State for Empty {
59385938 type Size = Unset;
59395939- type MimeType = Unset;
59405939 type Cid = Unset;
59405940+ type MimeType = Unset;
59415941 type CreatedAt = Unset;
59425942 }
59435943 ///State transition - sets the `size` field to Set
···59455945 impl<S: State> sealed::Sealed for SetSize<S> {}
59465946 impl<S: State> State for SetSize<S> {
59475947 type Size = Set<members::size>;
59485948- type MimeType = S::MimeType;
59495948 type Cid = S::Cid;
59505950- type CreatedAt = S::CreatedAt;
59515951- }
59525952- ///State transition - sets the `mime_type` field to Set
59535953- pub struct SetMimeType<S: State = Empty>(PhantomData<fn() -> S>);
59545954- impl<S: State> sealed::Sealed for SetMimeType<S> {}
59555955- impl<S: State> State for SetMimeType<S> {
59565956- type Size = S::Size;
59575957- type MimeType = Set<members::mime_type>;
59585958- type Cid = S::Cid;
59495949+ type MimeType = S::MimeType;
59595950 type CreatedAt = S::CreatedAt;
59605951 }
59615952 ///State transition - sets the `cid` field to Set
···59635954 impl<S: State> sealed::Sealed for SetCid<S> {}
59645955 impl<S: State> State for SetCid<S> {
59655956 type Size = S::Size;
59665966- type MimeType = S::MimeType;
59675957 type Cid = Set<members::cid>;
59585958+ type MimeType = S::MimeType;
59595959+ type CreatedAt = S::CreatedAt;
59605960+ }
59615961+ ///State transition - sets the `mime_type` field to Set
59625962+ pub struct SetMimeType<S: State = Empty>(PhantomData<fn() -> S>);
59635963+ impl<S: State> sealed::Sealed for SetMimeType<S> {}
59645964+ impl<S: State> State for SetMimeType<S> {
59655965+ type Size = S::Size;
59665966+ type Cid = S::Cid;
59675967+ type MimeType = Set<members::mime_type>;
59685968 type CreatedAt = S::CreatedAt;
59695969 }
59705970 ///State transition - sets the `created_at` field to Set
···59725972 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
59735973 impl<S: State> State for SetCreatedAt<S> {
59745974 type Size = S::Size;
59755975- type MimeType = S::MimeType;
59765975 type Cid = S::Cid;
59765976+ type MimeType = S::MimeType;
59775977 type CreatedAt = Set<members::created_at>;
59785978 }
59795979 /// Marker types for field names
···59815981 pub mod members {
59825982 ///Marker type for the `size` field
59835983 pub struct size(());
59845984+ ///Marker type for the `cid` field
59855985+ pub struct cid(());
59845986 ///Marker type for the `mime_type` field
59855987 pub struct mime_type(());
59865986- ///Marker type for the `cid` field
59875987- pub struct cid(());
59885988 ///Marker type for the `created_at` field
59895989 pub struct created_at(());
59905990 }
···61346134where
61356135 S: blob_view_state::State,
61366136 S::Size: blob_view_state::IsSet,
61376137- S::MimeType: blob_view_state::IsSet,
61386137 S::Cid: blob_view_state::IsSet,
61386138+ S::MimeType: blob_view_state::IsSet,
61396139 S::CreatedAt: blob_view_state::IsSet,
61406140{
61416141 /// Build the final struct
···81328132 }
81338133 /// State trait tracking which required fields have been set
81348134 pub trait State: sealed::Sealed {
81358135- type SubjectBlobCids;
81358135+ type Subject;
81368136+ type Event;
81368137 type CreatedBy;
81378138 type CreatedAt;
81388139 type Id;
81398139- type Event;
81408140- type Subject;
81408140+ type SubjectBlobCids;
81418141 }
81428142 /// Empty state - all required fields are unset
81438143 pub struct Empty(());
81448144 impl sealed::Sealed for Empty {}
81458145 impl State for Empty {
81468146- type SubjectBlobCids = Unset;
81468146+ type Subject = Unset;
81478147+ type Event = Unset;
81478148 type CreatedBy = Unset;
81488149 type CreatedAt = Unset;
81498150 type Id = Unset;
81508150- type Event = Unset;
81518151- type Subject = Unset;
81518151+ type SubjectBlobCids = Unset;
81528152 }
81538153- ///State transition - sets the `subject_blob_cids` field to Set
81548154- pub struct SetSubjectBlobCids<S: State = Empty>(PhantomData<fn() -> S>);
81558155- impl<S: State> sealed::Sealed for SetSubjectBlobCids<S> {}
81568156- impl<S: State> State for SetSubjectBlobCids<S> {
81578157- type SubjectBlobCids = Set<members::subject_blob_cids>;
81538153+ ///State transition - sets the `subject` field to Set
81548154+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
81558155+ impl<S: State> sealed::Sealed for SetSubject<S> {}
81568156+ impl<S: State> State for SetSubject<S> {
81578157+ type Subject = Set<members::subject>;
81588158+ type Event = S::Event;
81588159 type CreatedBy = S::CreatedBy;
81598160 type CreatedAt = S::CreatedAt;
81608161 type Id = S::Id;
81618161- type Event = S::Event;
81628162+ type SubjectBlobCids = S::SubjectBlobCids;
81638163+ }
81648164+ ///State transition - sets the `event` field to Set
81658165+ pub struct SetEvent<S: State = Empty>(PhantomData<fn() -> S>);
81668166+ impl<S: State> sealed::Sealed for SetEvent<S> {}
81678167+ impl<S: State> State for SetEvent<S> {
81628168 type Subject = S::Subject;
81698169+ type Event = Set<members::event>;
81708170+ type CreatedBy = S::CreatedBy;
81718171+ type CreatedAt = S::CreatedAt;
81728172+ type Id = S::Id;
81738173+ type SubjectBlobCids = S::SubjectBlobCids;
81638174 }
81648175 ///State transition - sets the `created_by` field to Set
81658176 pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
81668177 impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
81678178 impl<S: State> State for SetCreatedBy<S> {
81688168- type SubjectBlobCids = S::SubjectBlobCids;
81798179+ type Subject = S::Subject;
81808180+ type Event = S::Event;
81698181 type CreatedBy = Set<members::created_by>;
81708182 type CreatedAt = S::CreatedAt;
81718183 type Id = S::Id;
81728172- type Event = S::Event;
81738173- type Subject = S::Subject;
81848184+ type SubjectBlobCids = S::SubjectBlobCids;
81748185 }
81758186 ///State transition - sets the `created_at` field to Set
81768187 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
81778188 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
81788189 impl<S: State> State for SetCreatedAt<S> {
81798179- type SubjectBlobCids = S::SubjectBlobCids;
81908190+ type Subject = S::Subject;
81918191+ type Event = S::Event;
81808192 type CreatedBy = S::CreatedBy;
81818193 type CreatedAt = Set<members::created_at>;
81828194 type Id = S::Id;
81838183- type Event = S::Event;
81848184- type Subject = S::Subject;
81958195+ type SubjectBlobCids = S::SubjectBlobCids;
81858196 }
81868197 ///State transition - sets the `id` field to Set
81878198 pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
81888199 impl<S: State> sealed::Sealed for SetId<S> {}
81898200 impl<S: State> State for SetId<S> {
81908190- type SubjectBlobCids = S::SubjectBlobCids;
82018201+ type Subject = S::Subject;
82028202+ type Event = S::Event;
81918203 type CreatedBy = S::CreatedBy;
81928204 type CreatedAt = S::CreatedAt;
81938205 type Id = Set<members::id>;
81948194- type Event = S::Event;
81958195- type Subject = S::Subject;
81968196- }
81978197- ///State transition - sets the `event` field to Set
81988198- pub struct SetEvent<S: State = Empty>(PhantomData<fn() -> S>);
81998199- impl<S: State> sealed::Sealed for SetEvent<S> {}
82008200- impl<S: State> State for SetEvent<S> {
82018206 type SubjectBlobCids = S::SubjectBlobCids;
82028202- type CreatedBy = S::CreatedBy;
82038203- type CreatedAt = S::CreatedAt;
82048204- type Id = S::Id;
82058205- type Event = Set<members::event>;
82068206- type Subject = S::Subject;
82078207 }
82088208- ///State transition - sets the `subject` field to Set
82098209- pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
82108210- impl<S: State> sealed::Sealed for SetSubject<S> {}
82118211- impl<S: State> State for SetSubject<S> {
82128212- type SubjectBlobCids = S::SubjectBlobCids;
82088208+ ///State transition - sets the `subject_blob_cids` field to Set
82098209+ pub struct SetSubjectBlobCids<S: State = Empty>(PhantomData<fn() -> S>);
82108210+ impl<S: State> sealed::Sealed for SetSubjectBlobCids<S> {}
82118211+ impl<S: State> State for SetSubjectBlobCids<S> {
82128212+ type Subject = S::Subject;
82138213+ type Event = S::Event;
82138214 type CreatedBy = S::CreatedBy;
82148215 type CreatedAt = S::CreatedAt;
82158216 type Id = S::Id;
82168216- type Event = S::Event;
82178217- type Subject = Set<members::subject>;
82178217+ type SubjectBlobCids = Set<members::subject_blob_cids>;
82188218 }
82198219 /// Marker types for field names
82208220 #[allow(non_camel_case_types)]
82218221 pub mod members {
82228222- ///Marker type for the `subject_blob_cids` field
82238223- pub struct subject_blob_cids(());
82228222+ ///Marker type for the `subject` field
82238223+ pub struct subject(());
82248224+ ///Marker type for the `event` field
82258225+ pub struct event(());
82248226 ///Marker type for the `created_by` field
82258227 pub struct created_by(());
82268228 ///Marker type for the `created_at` field
82278229 pub struct created_at(());
82288230 ///Marker type for the `id` field
82298231 pub struct id(());
82308230- ///Marker type for the `event` field
82318231- pub struct event(());
82328232- ///Marker type for the `subject` field
82338233- pub struct subject(());
82328232+ ///Marker type for the `subject_blob_cids` field
82338233+ pub struct subject_blob_cids(());
82348234 }
82358235}
82368236···84538453impl<'a, S> ModEventViewBuilder<'a, S>
84548454where
84558455 S: mod_event_view_state::State,
84568456- S::SubjectBlobCids: mod_event_view_state::IsSet,
84568456+ S::Subject: mod_event_view_state::IsSet,
84578457+ S::Event: mod_event_view_state::IsSet,
84578458 S::CreatedBy: mod_event_view_state::IsSet,
84588459 S::CreatedAt: mod_event_view_state::IsSet,
84598460 S::Id: mod_event_view_state::IsSet,
84608460- S::Event: mod_event_view_state::IsSet,
84618461- S::Subject: mod_event_view_state::IsSet,
84618461+ S::SubjectBlobCids: mod_event_view_state::IsSet,
84628462{
84638463 /// Build the final struct
84648464 pub fn build(self) -> ModEventView<'a> {
···86528652 }
86538653 /// State trait tracking which required fields have been set
86548654 pub trait State: sealed::Sealed {
86558655+ type Id;
86568656+ type SubjectBlobs;
86558657 type CreatedBy;
86568658 type CreatedAt;
86578657- type Id;
86588658- type Subject;
86598659 type Event;
86608660- type SubjectBlobs;
86608660+ type Subject;
86618661 }
86628662 /// Empty state - all required fields are unset
86638663 pub struct Empty(());
86648664 impl sealed::Sealed for Empty {}
86658665 impl State for Empty {
86668666+ type Id = Unset;
86678667+ type SubjectBlobs = Unset;
86668668 type CreatedBy = Unset;
86678669 type CreatedAt = Unset;
86688668- type Id = Unset;
86708670+ type Event = Unset;
86698671 type Subject = Unset;
86708670- type Event = Unset;
86718671- type SubjectBlobs = Unset;
86728672+ }
86738673+ ///State transition - sets the `id` field to Set
86748674+ pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
86758675+ impl<S: State> sealed::Sealed for SetId<S> {}
86768676+ impl<S: State> State for SetId<S> {
86778677+ type Id = Set<members::id>;
86788678+ type SubjectBlobs = S::SubjectBlobs;
86798679+ type CreatedBy = S::CreatedBy;
86808680+ type CreatedAt = S::CreatedAt;
86818681+ type Event = S::Event;
86828682+ type Subject = S::Subject;
86838683+ }
86848684+ ///State transition - sets the `subject_blobs` field to Set
86858685+ pub struct SetSubjectBlobs<S: State = Empty>(PhantomData<fn() -> S>);
86868686+ impl<S: State> sealed::Sealed for SetSubjectBlobs<S> {}
86878687+ impl<S: State> State for SetSubjectBlobs<S> {
86888688+ type Id = S::Id;
86898689+ type SubjectBlobs = Set<members::subject_blobs>;
86908690+ type CreatedBy = S::CreatedBy;
86918691+ type CreatedAt = S::CreatedAt;
86928692+ type Event = S::Event;
86938693+ type Subject = S::Subject;
86728694 }
86738695 ///State transition - sets the `created_by` field to Set
86748696 pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
86758697 impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
86768698 impl<S: State> State for SetCreatedBy<S> {
86998699+ type Id = S::Id;
87008700+ type SubjectBlobs = S::SubjectBlobs;
86778701 type CreatedBy = Set<members::created_by>;
86788702 type CreatedAt = S::CreatedAt;
86798679- type Id = S::Id;
86808680- type Subject = S::Subject;
86818703 type Event = S::Event;
86828682- type SubjectBlobs = S::SubjectBlobs;
87048704+ type Subject = S::Subject;
86838705 }
86848706 ///State transition - sets the `created_at` field to Set
86858707 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
86868708 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
86878709 impl<S: State> State for SetCreatedAt<S> {
87108710+ type Id = S::Id;
87118711+ type SubjectBlobs = S::SubjectBlobs;
86888712 type CreatedBy = S::CreatedBy;
86898713 type CreatedAt = Set<members::created_at>;
86908690- type Id = S::Id;
86918691- type Subject = S::Subject;
86928714 type Event = S::Event;
86938693- type SubjectBlobs = S::SubjectBlobs;
87158715+ type Subject = S::Subject;
86948716 }
86958695- ///State transition - sets the `id` field to Set
86968696- pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
86978697- impl<S: State> sealed::Sealed for SetId<S> {}
86988698- impl<S: State> State for SetId<S> {
87178717+ ///State transition - sets the `event` field to Set
87188718+ pub struct SetEvent<S: State = Empty>(PhantomData<fn() -> S>);
87198719+ impl<S: State> sealed::Sealed for SetEvent<S> {}
87208720+ impl<S: State> State for SetEvent<S> {
87218721+ type Id = S::Id;
87228722+ type SubjectBlobs = S::SubjectBlobs;
86998723 type CreatedBy = S::CreatedBy;
87008724 type CreatedAt = S::CreatedAt;
87018701- type Id = Set<members::id>;
87258725+ type Event = Set<members::event>;
87028726 type Subject = S::Subject;
87038703- type Event = S::Event;
87048704- type SubjectBlobs = S::SubjectBlobs;
87058727 }
87068728 ///State transition - sets the `subject` field to Set
87078729 pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
87088730 impl<S: State> sealed::Sealed for SetSubject<S> {}
87098731 impl<S: State> State for SetSubject<S> {
87108710- type CreatedBy = S::CreatedBy;
87118711- type CreatedAt = S::CreatedAt;
87128732 type Id = S::Id;
87138713- type Subject = Set<members::subject>;
87148714- type Event = S::Event;
87158733 type SubjectBlobs = S::SubjectBlobs;
87168716- }
87178717- ///State transition - sets the `event` field to Set
87188718- pub struct SetEvent<S: State = Empty>(PhantomData<fn() -> S>);
87198719- impl<S: State> sealed::Sealed for SetEvent<S> {}
87208720- impl<S: State> State for SetEvent<S> {
87218734 type CreatedBy = S::CreatedBy;
87228735 type CreatedAt = S::CreatedAt;
87238723- type Id = S::Id;
87248724- type Subject = S::Subject;
87258725- type Event = Set<members::event>;
87268726- type SubjectBlobs = S::SubjectBlobs;
87278727- }
87288728- ///State transition - sets the `subject_blobs` field to Set
87298729- pub struct SetSubjectBlobs<S: State = Empty>(PhantomData<fn() -> S>);
87308730- impl<S: State> sealed::Sealed for SetSubjectBlobs<S> {}
87318731- impl<S: State> State for SetSubjectBlobs<S> {
87328732- type CreatedBy = S::CreatedBy;
87338733- type CreatedAt = S::CreatedAt;
87348734- type Id = S::Id;
87358735- type Subject = S::Subject;
87368736 type Event = S::Event;
87378737- type SubjectBlobs = Set<members::subject_blobs>;
87378737+ type Subject = Set<members::subject>;
87388738 }
87398739 /// Marker types for field names
87408740 #[allow(non_camel_case_types)]
87418741 pub mod members {
87428742+ ///Marker type for the `id` field
87438743+ pub struct id(());
87448744+ ///Marker type for the `subject_blobs` field
87458745+ pub struct subject_blobs(());
87428746 ///Marker type for the `created_by` field
87438747 pub struct created_by(());
87448748 ///Marker type for the `created_at` field
87458749 pub struct created_at(());
87468746- ///Marker type for the `id` field
87478747- pub struct id(());
87488748- ///Marker type for the `subject` field
87498749- pub struct subject(());
87508750 ///Marker type for the `event` field
87518751 pub struct event(());
87528752- ///Marker type for the `subject_blobs` field
87538753- pub struct subject_blobs(());
87528752+ ///Marker type for the `subject` field
87538753+ pub struct subject(());
87548754 }
87558755}
87568756···89238923impl<'a, S> ModEventViewDetailBuilder<'a, S>
89248924where
89258925 S: mod_event_view_detail_state::State,
89268926+ S::Id: mod_event_view_detail_state::IsSet,
89278927+ S::SubjectBlobs: mod_event_view_detail_state::IsSet,
89268928 S::CreatedBy: mod_event_view_detail_state::IsSet,
89278929 S::CreatedAt: mod_event_view_detail_state::IsSet,
89288928- S::Id: mod_event_view_detail_state::IsSet,
89298929- S::Subject: mod_event_view_detail_state::IsSet,
89308930 S::Event: mod_event_view_detail_state::IsSet,
89318931- S::SubjectBlobs: mod_event_view_detail_state::IsSet,
89318931+ S::Subject: mod_event_view_detail_state::IsSet,
89328932{
89338933 /// Build the final struct
89348934 pub fn build(self) -> ModEventViewDetail<'a> {
···92319231 }
92329232 /// State trait tracking which required fields have been set
92339233 pub trait State: sealed::Sealed {
92349234- type Op;
92359234 type Timestamp;
92359235+ type Op;
92369236 }
92379237 /// Empty state - all required fields are unset
92389238 pub struct Empty(());
92399239 impl sealed::Sealed for Empty {}
92409240 impl State for Empty {
92419241+ type Timestamp = Unset;
92419242 type Op = Unset;
92429242- type Timestamp = Unset;
92439243+ }
92449244+ ///State transition - sets the `timestamp` field to Set
92459245+ pub struct SetTimestamp<S: State = Empty>(PhantomData<fn() -> S>);
92469246+ impl<S: State> sealed::Sealed for SetTimestamp<S> {}
92479247+ impl<S: State> State for SetTimestamp<S> {
92489248+ type Timestamp = Set<members::timestamp>;
92499249+ type Op = S::Op;
92439250 }
92449251 ///State transition - sets the `op` field to Set
92459252 pub struct SetOp<S: State = Empty>(PhantomData<fn() -> S>);
92469253 impl<S: State> sealed::Sealed for SetOp<S> {}
92479254 impl<S: State> State for SetOp<S> {
92559255+ type Timestamp = S::Timestamp;
92489256 type Op = Set<members::op>;
92499249- type Timestamp = S::Timestamp;
92509250- }
92519251- ///State transition - sets the `timestamp` field to Set
92529252- pub struct SetTimestamp<S: State = Empty>(PhantomData<fn() -> S>);
92539253- impl<S: State> sealed::Sealed for SetTimestamp<S> {}
92549254- impl<S: State> State for SetTimestamp<S> {
92559255- type Op = S::Op;
92569256- type Timestamp = Set<members::timestamp>;
92579257 }
92589258 /// Marker types for field names
92599259 #[allow(non_camel_case_types)]
92609260 pub mod members {
92619261+ ///Marker type for the `timestamp` field
92629262+ pub struct timestamp(());
92619263 ///Marker type for the `op` field
92629264 pub struct op(());
92639263- ///Marker type for the `timestamp` field
92649264- pub struct timestamp(());
92659265 }
92669266}
92679267···93719371impl<'a, S> RecordEventBuilder<'a, S>
93729372where
93739373 S: record_event_state::State,
93749374- S::Op: record_event_state::IsSet,
93759374 S::Timestamp: record_event_state::IsSet,
93759375+ S::Op: record_event_state::IsSet,
93769376{
93779377 /// Build the final struct
93789378 pub fn build(self) -> RecordEvent<'a> {
···96779677 }
96789678 /// State trait tracking which required fields have been set
96799679 pub trait State: sealed::Sealed {
96809680+ type Moderation;
96809681 type Repo;
96819681- type Uri;
96829682- type Moderation;
96839682 type IndexedAt;
96849684- type Cid;
96859683 type BlobCids;
96849684+ type Cid;
96869685 type Value;
96869686+ type Uri;
96879687 }
96889688 /// Empty state - all required fields are unset
96899689 pub struct Empty(());
96909690 impl sealed::Sealed for Empty {}
96919691 impl State for Empty {
96929692- type Repo = Unset;
96939693- type Uri = Unset;
96949692 type Moderation = Unset;
96939693+ type Repo = Unset;
96959694 type IndexedAt = Unset;
96959695+ type BlobCids = Unset;
96969696 type Cid = Unset;
96979697- type BlobCids = Unset;
96989697 type Value = Unset;
96989698+ type Uri = Unset;
96999699+ }
97009700+ ///State transition - sets the `moderation` field to Set
97019701+ pub struct SetModeration<S: State = Empty>(PhantomData<fn() -> S>);
97029702+ impl<S: State> sealed::Sealed for SetModeration<S> {}
97039703+ impl<S: State> State for SetModeration<S> {
97049704+ type Moderation = Set<members::moderation>;
97059705+ type Repo = S::Repo;
97069706+ type IndexedAt = S::IndexedAt;
97079707+ type BlobCids = S::BlobCids;
97089708+ type Cid = S::Cid;
97099709+ type Value = S::Value;
97109710+ type Uri = S::Uri;
96999711 }
97009712 ///State transition - sets the `repo` field to Set
97019713 pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
97029714 impl<S: State> sealed::Sealed for SetRepo<S> {}
97039715 impl<S: State> State for SetRepo<S> {
97169716+ type Moderation = S::Moderation;
97049717 type Repo = Set<members::repo>;
97059705- type Uri = S::Uri;
97069706- type Moderation = S::Moderation;
97079718 type IndexedAt = S::IndexedAt;
97089708- type Cid = S::Cid;
97099719 type BlobCids = S::BlobCids;
97109710- type Value = S::Value;
97119711- }
97129712- ///State transition - sets the `uri` field to Set
97139713- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
97149714- impl<S: State> sealed::Sealed for SetUri<S> {}
97159715- impl<S: State> State for SetUri<S> {
97169716- type Repo = S::Repo;
97179717- type Uri = Set<members::uri>;
97189718- type Moderation = S::Moderation;
97199719- type IndexedAt = S::IndexedAt;
97209720 type Cid = S::Cid;
97219721- type BlobCids = S::BlobCids;
97229721 type Value = S::Value;
97239723- }
97249724- ///State transition - sets the `moderation` field to Set
97259725- pub struct SetModeration<S: State = Empty>(PhantomData<fn() -> S>);
97269726- impl<S: State> sealed::Sealed for SetModeration<S> {}
97279727- impl<S: State> State for SetModeration<S> {
97289728- type Repo = S::Repo;
97299722 type Uri = S::Uri;
97309730- type Moderation = Set<members::moderation>;
97319731- type IndexedAt = S::IndexedAt;
97329732- type Cid = S::Cid;
97339733- type BlobCids = S::BlobCids;
97349734- type Value = S::Value;
97359723 }
97369724 ///State transition - sets the `indexed_at` field to Set
97379725 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
97389726 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
97399727 impl<S: State> State for SetIndexedAt<S> {
97289728+ type Moderation = S::Moderation;
97409729 type Repo = S::Repo;
97309730+ type IndexedAt = Set<members::indexed_at>;
97319731+ type BlobCids = S::BlobCids;
97329732+ type Cid = S::Cid;
97339733+ type Value = S::Value;
97419734 type Uri = S::Uri;
97359735+ }
97369736+ ///State transition - sets the `blob_cids` field to Set
97379737+ pub struct SetBlobCids<S: State = Empty>(PhantomData<fn() -> S>);
97389738+ impl<S: State> sealed::Sealed for SetBlobCids<S> {}
97399739+ impl<S: State> State for SetBlobCids<S> {
97429740 type Moderation = S::Moderation;
97439743- type IndexedAt = Set<members::indexed_at>;
97419741+ type Repo = S::Repo;
97429742+ type IndexedAt = S::IndexedAt;
97439743+ type BlobCids = Set<members::blob_cids>;
97449744 type Cid = S::Cid;
97459745- type BlobCids = S::BlobCids;
97469745 type Value = S::Value;
97469746+ type Uri = S::Uri;
97479747 }
97489748 ///State transition - sets the `cid` field to Set
97499749 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
97509750 impl<S: State> sealed::Sealed for SetCid<S> {}
97519751 impl<S: State> State for SetCid<S> {
97529752+ type Moderation = S::Moderation;
97529753 type Repo = S::Repo;
97539753- type Uri = S::Uri;
97549754- type Moderation = S::Moderation;
97559754 type IndexedAt = S::IndexedAt;
97569756- type Cid = Set<members::cid>;
97579755 type BlobCids = S::BlobCids;
97569756+ type Cid = Set<members::cid>;
97589757 type Value = S::Value;
97599759- }
97609760- ///State transition - sets the `blob_cids` field to Set
97619761- pub struct SetBlobCids<S: State = Empty>(PhantomData<fn() -> S>);
97629762- impl<S: State> sealed::Sealed for SetBlobCids<S> {}
97639763- impl<S: State> State for SetBlobCids<S> {
97649764- type Repo = S::Repo;
97659758 type Uri = S::Uri;
97669766- type Moderation = S::Moderation;
97679767- type IndexedAt = S::IndexedAt;
97689768- type Cid = S::Cid;
97699769- type BlobCids = Set<members::blob_cids>;
97709770- type Value = S::Value;
97719759 }
97729760 ///State transition - sets the `value` field to Set
97739761 pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
97749762 impl<S: State> sealed::Sealed for SetValue<S> {}
97759763 impl<S: State> State for SetValue<S> {
97649764+ type Moderation = S::Moderation;
97769765 type Repo = S::Repo;
97669766+ type IndexedAt = S::IndexedAt;
97679767+ type BlobCids = S::BlobCids;
97689768+ type Cid = S::Cid;
97699769+ type Value = Set<members::value>;
97779770 type Uri = S::Uri;
97719771+ }
97729772+ ///State transition - sets the `uri` field to Set
97739773+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
97749774+ impl<S: State> sealed::Sealed for SetUri<S> {}
97759775+ impl<S: State> State for SetUri<S> {
97789776 type Moderation = S::Moderation;
97779777+ type Repo = S::Repo;
97799778 type IndexedAt = S::IndexedAt;
97809780- type Cid = S::Cid;
97819779 type BlobCids = S::BlobCids;
97829782- type Value = Set<members::value>;
97809780+ type Cid = S::Cid;
97819781+ type Value = S::Value;
97829782+ type Uri = Set<members::uri>;
97839783 }
97849784 /// Marker types for field names
97859785 #[allow(non_camel_case_types)]
97869786 pub mod members {
97879787+ ///Marker type for the `moderation` field
97889788+ pub struct moderation(());
97879789 ///Marker type for the `repo` field
97889790 pub struct repo(());
97899789- ///Marker type for the `uri` field
97909790- pub struct uri(());
97919791- ///Marker type for the `moderation` field
97929792- pub struct moderation(());
97939791 ///Marker type for the `indexed_at` field
97949792 pub struct indexed_at(());
97939793+ ///Marker type for the `blob_cids` field
97949794+ pub struct blob_cids(());
97959795 ///Marker type for the `cid` field
97969796 pub struct cid(());
97979797- ///Marker type for the `blob_cids` field
97989798- pub struct blob_cids(());
97999797 ///Marker type for the `value` field
98009798 pub struct value(());
97999799+ ///Marker type for the `uri` field
98009800+ pub struct uri(());
98019801 }
98029802}
98039803···99709970impl<'a, S> RecordViewBuilder<'a, S>
99719971where
99729972 S: record_view_state::State,
99739973+ S::Moderation: record_view_state::IsSet,
99739974 S::Repo: record_view_state::IsSet,
99749974- S::Uri: record_view_state::IsSet,
99759975- S::Moderation: record_view_state::IsSet,
99769975 S::IndexedAt: record_view_state::IsSet,
99769976+ S::BlobCids: record_view_state::IsSet,
99779977 S::Cid: record_view_state::IsSet,
99789978- S::BlobCids: record_view_state::IsSet,
99799978 S::Value: record_view_state::IsSet,
99799979+ S::Uri: record_view_state::IsSet,
99809980{
99819981 /// Build the final struct
99829982 pub fn build(self) -> RecordView<'a> {
···1007010070 /// State trait tracking which required fields have been set
1007110071 pub trait State: sealed::Sealed {
1007210072 type Blobs;
1007310073+ type Value;
1007310074 type IndexedAt;
1007410075 type Repo;
1007510075- type Value;
1007610076+ type Cid;
1007610077 type Moderation;
1007710078 type Uri;
1007810078- type Cid;
1007910079 }
1008010080 /// Empty state - all required fields are unset
1008110081 pub struct Empty(());
1008210082 impl sealed::Sealed for Empty {}
1008310083 impl State for Empty {
1008410084 type Blobs = Unset;
1008510085+ type Value = Unset;
1008510086 type IndexedAt = Unset;
1008610087 type Repo = Unset;
1008710087- type Value = Unset;
1008810088+ type Cid = Unset;
1008810089 type Moderation = Unset;
1008910090 type Uri = Unset;
1009010090- type Cid = Unset;
1009110091 }
1009210092 ///State transition - sets the `blobs` field to Set
1009310093 pub struct SetBlobs<S: State = Empty>(PhantomData<fn() -> S>);
1009410094 impl<S: State> sealed::Sealed for SetBlobs<S> {}
1009510095 impl<S: State> State for SetBlobs<S> {
1009610096 type Blobs = Set<members::blobs>;
1009710097+ type Value = S::Value;
1009710098 type IndexedAt = S::IndexedAt;
1009810099 type Repo = S::Repo;
1009910099- type Value = S::Value;
1010010100+ type Cid = S::Cid;
1010010101 type Moderation = S::Moderation;
1010110102 type Uri = S::Uri;
1010310103+ }
1010410104+ ///State transition - sets the `value` field to Set
1010510105+ pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
1010610106+ impl<S: State> sealed::Sealed for SetValue<S> {}
1010710107+ impl<S: State> State for SetValue<S> {
1010810108+ type Blobs = S::Blobs;
1010910109+ type Value = Set<members::value>;
1011010110+ type IndexedAt = S::IndexedAt;
1011110111+ type Repo = S::Repo;
1010210112 type Cid = S::Cid;
1011310113+ type Moderation = S::Moderation;
1011410114+ type Uri = S::Uri;
1010310115 }
1010410116 ///State transition - sets the `indexed_at` field to Set
1010510117 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
1010610118 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
1010710119 impl<S: State> State for SetIndexedAt<S> {
1010810120 type Blobs = S::Blobs;
1012110121+ type Value = S::Value;
1010910122 type IndexedAt = Set<members::indexed_at>;
1011010123 type Repo = S::Repo;
1011110111- type Value = S::Value;
1012410124+ type Cid = S::Cid;
1011210125 type Moderation = S::Moderation;
1011310126 type Uri = S::Uri;
1011410114- type Cid = S::Cid;
1011510127 }
1011610128 ///State transition - sets the `repo` field to Set
1011710129 pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
1011810130 impl<S: State> sealed::Sealed for SetRepo<S> {}
1011910131 impl<S: State> State for SetRepo<S> {
1012010132 type Blobs = S::Blobs;
1013310133+ type Value = S::Value;
1012110134 type IndexedAt = S::IndexedAt;
1012210135 type Repo = Set<members::repo>;
1012310123- type Value = S::Value;
1013610136+ type Cid = S::Cid;
1012410137 type Moderation = S::Moderation;
1012510138 type Uri = S::Uri;
1012610126- type Cid = S::Cid;
1012710139 }
1012810128- ///State transition - sets the `value` field to Set
1012910129- pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
1013010130- impl<S: State> sealed::Sealed for SetValue<S> {}
1013110131- impl<S: State> State for SetValue<S> {
1014010140+ ///State transition - sets the `cid` field to Set
1014110141+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
1014210142+ impl<S: State> sealed::Sealed for SetCid<S> {}
1014310143+ impl<S: State> State for SetCid<S> {
1013210144 type Blobs = S::Blobs;
1014510145+ type Value = S::Value;
1013310146 type IndexedAt = S::IndexedAt;
1013410147 type Repo = S::Repo;
1013510135- type Value = Set<members::value>;
1014810148+ type Cid = Set<members::cid>;
1013610149 type Moderation = S::Moderation;
1013710150 type Uri = S::Uri;
1013810138- type Cid = S::Cid;
1013910151 }
1014010152 ///State transition - sets the `moderation` field to Set
1014110153 pub struct SetModeration<S: State = Empty>(PhantomData<fn() -> S>);
1014210154 impl<S: State> sealed::Sealed for SetModeration<S> {}
1014310155 impl<S: State> State for SetModeration<S> {
1014410156 type Blobs = S::Blobs;
1015710157+ type Value = S::Value;
1014510158 type IndexedAt = S::IndexedAt;
1014610159 type Repo = S::Repo;
1014710147- type Value = S::Value;
1016010160+ type Cid = S::Cid;
1014810161 type Moderation = Set<members::moderation>;
1014910162 type Uri = S::Uri;
1015010150- type Cid = S::Cid;
1015110163 }
1015210164 ///State transition - sets the `uri` field to Set
1015310165 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
1015410166 impl<S: State> sealed::Sealed for SetUri<S> {}
1015510167 impl<S: State> State for SetUri<S> {
1015610168 type Blobs = S::Blobs;
1016910169+ type Value = S::Value;
1015710170 type IndexedAt = S::IndexedAt;
1015810171 type Repo = S::Repo;
1015910159- type Value = S::Value;
1017210172+ type Cid = S::Cid;
1016010173 type Moderation = S::Moderation;
1016110174 type Uri = Set<members::uri>;
1016210162- type Cid = S::Cid;
1016310163- }
1016410164- ///State transition - sets the `cid` field to Set
1016510165- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
1016610166- impl<S: State> sealed::Sealed for SetCid<S> {}
1016710167- impl<S: State> State for SetCid<S> {
1016810168- type Blobs = S::Blobs;
1016910169- type IndexedAt = S::IndexedAt;
1017010170- type Repo = S::Repo;
1017110171- type Value = S::Value;
1017210172- type Moderation = S::Moderation;
1017310173- type Uri = S::Uri;
1017410174- type Cid = Set<members::cid>;
1017510175 }
1017610176 /// Marker types for field names
1017710177 #[allow(non_camel_case_types)]
1017810178 pub mod members {
1017910179 ///Marker type for the `blobs` field
1018010180 pub struct blobs(());
1018110181+ ///Marker type for the `value` field
1018210182+ pub struct value(());
1018110183 ///Marker type for the `indexed_at` field
1018210184 pub struct indexed_at(());
1018310185 ///Marker type for the `repo` field
1018410186 pub struct repo(());
1018510185- ///Marker type for the `value` field
1018610186- pub struct value(());
1018710187+ ///Marker type for the `cid` field
1018810188+ pub struct cid(());
1018710189 ///Marker type for the `moderation` field
1018810190 pub struct moderation(());
1018910191 ///Marker type for the `uri` field
1019010192 pub struct uri(());
1019110191- ///Marker type for the `cid` field
1019210192- pub struct cid(());
1019310193 }
1019410194}
1019510195···1038310383where
1038410384 S: record_view_detail_state::State,
1038510385 S::Blobs: record_view_detail_state::IsSet,
1038610386+ S::Value: record_view_detail_state::IsSet,
1038610387 S::IndexedAt: record_view_detail_state::IsSet,
1038710388 S::Repo: record_view_detail_state::IsSet,
1038810388- S::Value: record_view_detail_state::IsSet,
1038910389+ S::Cid: record_view_detail_state::IsSet,
1038910390 S::Moderation: record_view_detail_state::IsSet,
1039010391 S::Uri: record_view_detail_state::IsSet,
1039110391- S::Cid: record_view_detail_state::IsSet,
1039210392{
1039310393 /// Build the final struct
1039410394 pub fn build(self) -> RecordViewDetail<'a> {
···1068910689 }
1069010690 /// State trait tracking which required fields have been set
1069110691 pub trait State: sealed::Sealed {
1069210692+ type IndexedAt;
1069210693 type RelatedRecords;
1069310693- type Handle;
1069410694- type IndexedAt;
1069510694 type Moderation;
1069610695 type Did;
1069610696+ type Handle;
1069710697 }
1069810698 /// Empty state - all required fields are unset
1069910699 pub struct Empty(());
1070010700 impl sealed::Sealed for Empty {}
1070110701 impl State for Empty {
1070210702+ type IndexedAt = Unset;
1070210703 type RelatedRecords = Unset;
1070310703- type Handle = Unset;
1070410704- type IndexedAt = Unset;
1070510704 type Moderation = Unset;
1070610705 type Did = Unset;
1070710707- }
1070810708- ///State transition - sets the `related_records` field to Set
1070910709- pub struct SetRelatedRecords<S: State = Empty>(PhantomData<fn() -> S>);
1071010710- impl<S: State> sealed::Sealed for SetRelatedRecords<S> {}
1071110711- impl<S: State> State for SetRelatedRecords<S> {
1071210712- type RelatedRecords = Set<members::related_records>;
1071310713- type Handle = S::Handle;
1071410714- type IndexedAt = S::IndexedAt;
1071510715- type Moderation = S::Moderation;
1071610716- type Did = S::Did;
1071710717- }
1071810718- ///State transition - sets the `handle` field to Set
1071910719- pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
1072010720- impl<S: State> sealed::Sealed for SetHandle<S> {}
1072110721- impl<S: State> State for SetHandle<S> {
1072210722- type RelatedRecords = S::RelatedRecords;
1072310723- type Handle = Set<members::handle>;
1072410724- type IndexedAt = S::IndexedAt;
1072510725- type Moderation = S::Moderation;
1072610726- type Did = S::Did;
1070610706+ type Handle = Unset;
1072710707 }
1072810708 ///State transition - sets the `indexed_at` field to Set
1072910709 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
1073010710 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
1073110711 impl<S: State> State for SetIndexedAt<S> {
1071210712+ type IndexedAt = Set<members::indexed_at>;
1073210713 type RelatedRecords = S::RelatedRecords;
1071410714+ type Moderation = S::Moderation;
1071510715+ type Did = S::Did;
1073310716 type Handle = S::Handle;
1073410734- type IndexedAt = Set<members::indexed_at>;
1071710717+ }
1071810718+ ///State transition - sets the `related_records` field to Set
1071910719+ pub struct SetRelatedRecords<S: State = Empty>(PhantomData<fn() -> S>);
1072010720+ impl<S: State> sealed::Sealed for SetRelatedRecords<S> {}
1072110721+ impl<S: State> State for SetRelatedRecords<S> {
1072210722+ type IndexedAt = S::IndexedAt;
1072310723+ type RelatedRecords = Set<members::related_records>;
1073510724 type Moderation = S::Moderation;
1073610725 type Did = S::Did;
1072610726+ type Handle = S::Handle;
1073710727 }
1073810728 ///State transition - sets the `moderation` field to Set
1073910729 pub struct SetModeration<S: State = Empty>(PhantomData<fn() -> S>);
1074010730 impl<S: State> sealed::Sealed for SetModeration<S> {}
1074110731 impl<S: State> State for SetModeration<S> {
1073210732+ type IndexedAt = S::IndexedAt;
1074210733 type RelatedRecords = S::RelatedRecords;
1074310743- type Handle = S::Handle;
1074410744- type IndexedAt = S::IndexedAt;
1074510734 type Moderation = Set<members::moderation>;
1074610735 type Did = S::Did;
1073610736+ type Handle = S::Handle;
1074710737 }
1074810738 ///State transition - sets the `did` field to Set
1074910739 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
1075010740 impl<S: State> sealed::Sealed for SetDid<S> {}
1075110741 impl<S: State> State for SetDid<S> {
1074210742+ type IndexedAt = S::IndexedAt;
1075210743 type RelatedRecords = S::RelatedRecords;
1074410744+ type Moderation = S::Moderation;
1074510745+ type Did = Set<members::did>;
1075310746 type Handle = S::Handle;
1074710747+ }
1074810748+ ///State transition - sets the `handle` field to Set
1074910749+ pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
1075010750+ impl<S: State> sealed::Sealed for SetHandle<S> {}
1075110751+ impl<S: State> State for SetHandle<S> {
1075410752 type IndexedAt = S::IndexedAt;
1075310753+ type RelatedRecords = S::RelatedRecords;
1075510754 type Moderation = S::Moderation;
1075610756- type Did = Set<members::did>;
1075510755+ type Did = S::Did;
1075610756+ type Handle = Set<members::handle>;
1075710757 }
1075810758 /// Marker types for field names
1075910759 #[allow(non_camel_case_types)]
1076010760 pub mod members {
1076110761+ ///Marker type for the `indexed_at` field
1076210762+ pub struct indexed_at(());
1076110763 ///Marker type for the `related_records` field
1076210764 pub struct related_records(());
1076310763- ///Marker type for the `handle` field
1076410764- pub struct handle(());
1076510765- ///Marker type for the `indexed_at` field
1076610766- pub struct indexed_at(());
1076710765 ///Marker type for the `moderation` field
1076810766 pub struct moderation(());
1076910767 ///Marker type for the `did` field
1077010768 pub struct did(());
1076910769+ ///Marker type for the `handle` field
1077010770+ pub struct handle(());
1077110771 }
1077210772}
1077310773···1102311023impl<'a, S> RepoViewBuilder<'a, S>
1102411024where
1102511025 S: repo_view_state::State,
1102611026- S::RelatedRecords: repo_view_state::IsSet,
1102711027- S::Handle: repo_view_state::IsSet,
1102811026 S::IndexedAt: repo_view_state::IsSet,
1102711027+ S::RelatedRecords: repo_view_state::IsSet,
1102911028 S::Moderation: repo_view_state::IsSet,
1103011029 S::Did: repo_view_state::IsSet,
1103011030+ S::Handle: repo_view_state::IsSet,
1103111031{
1103211032 /// Build the final struct
1103311033 pub fn build(self) -> RepoView<'a> {
···1114911149 }
1115011150 /// State trait tracking which required fields have been set
1115111151 pub trait State: sealed::Sealed {
1115211152+ type Handle;
1115211153 type IndexedAt;
1115311153- type RelatedRecords;
1115411154 type Moderation;
1115511155 type Did;
1115611156- type Handle;
1115611156+ type RelatedRecords;
1115711157 }
1115811158 /// Empty state - all required fields are unset
1115911159 pub struct Empty(());
1116011160 impl sealed::Sealed for Empty {}
1116111161 impl State for Empty {
1116211162+ type Handle = Unset;
1116211163 type IndexedAt = Unset;
1116311163- type RelatedRecords = Unset;
1116411164 type Moderation = Unset;
1116511165 type Did = Unset;
1116611166- type Handle = Unset;
1116611166+ type RelatedRecords = Unset;
1116711167+ }
1116811168+ ///State transition - sets the `handle` field to Set
1116911169+ pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
1117011170+ impl<S: State> sealed::Sealed for SetHandle<S> {}
1117111171+ impl<S: State> State for SetHandle<S> {
1117211172+ type Handle = Set<members::handle>;
1117311173+ type IndexedAt = S::IndexedAt;
1117411174+ type Moderation = S::Moderation;
1117511175+ type Did = S::Did;
1117611176+ type RelatedRecords = S::RelatedRecords;
1116711177 }
1116811178 ///State transition - sets the `indexed_at` field to Set
1116911179 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
1117011180 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
1117111181 impl<S: State> State for SetIndexedAt<S> {
1118211182+ type Handle = S::Handle;
1117211183 type IndexedAt = Set<members::indexed_at>;
1117311173- type RelatedRecords = S::RelatedRecords;
1117411184 type Moderation = S::Moderation;
1117511185 type Did = S::Did;
1117611176- type Handle = S::Handle;
1117711177- }
1117811178- ///State transition - sets the `related_records` field to Set
1117911179- pub struct SetRelatedRecords<S: State = Empty>(PhantomData<fn() -> S>);
1118011180- impl<S: State> sealed::Sealed for SetRelatedRecords<S> {}
1118111181- impl<S: State> State for SetRelatedRecords<S> {
1118211182- type IndexedAt = S::IndexedAt;
1118311183- type RelatedRecords = Set<members::related_records>;
1118411184- type Moderation = S::Moderation;
1118511185- type Did = S::Did;
1118611186- type Handle = S::Handle;
1118611186+ type RelatedRecords = S::RelatedRecords;
1118711187 }
1118811188 ///State transition - sets the `moderation` field to Set
1118911189 pub struct SetModeration<S: State = Empty>(PhantomData<fn() -> S>);
1119011190 impl<S: State> sealed::Sealed for SetModeration<S> {}
1119111191 impl<S: State> State for SetModeration<S> {
1119211192+ type Handle = S::Handle;
1119211193 type IndexedAt = S::IndexedAt;
1119311193- type RelatedRecords = S::RelatedRecords;
1119411194 type Moderation = Set<members::moderation>;
1119511195 type Did = S::Did;
1119611196- type Handle = S::Handle;
1119611196+ type RelatedRecords = S::RelatedRecords;
1119711197 }
1119811198 ///State transition - sets the `did` field to Set
1119911199 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
1120011200 impl<S: State> sealed::Sealed for SetDid<S> {}
1120111201 impl<S: State> State for SetDid<S> {
1120211202+ type Handle = S::Handle;
1120211203 type IndexedAt = S::IndexedAt;
1120311203- type RelatedRecords = S::RelatedRecords;
1120411204 type Moderation = S::Moderation;
1120511205 type Did = Set<members::did>;
1120611206+ type RelatedRecords = S::RelatedRecords;
1120711207+ }
1120811208+ ///State transition - sets the `related_records` field to Set
1120911209+ pub struct SetRelatedRecords<S: State = Empty>(PhantomData<fn() -> S>);
1121011210+ impl<S: State> sealed::Sealed for SetRelatedRecords<S> {}
1121111211+ impl<S: State> State for SetRelatedRecords<S> {
1120611212 type Handle = S::Handle;
1120711207- }
1120811208- ///State transition - sets the `handle` field to Set
1120911209- pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
1121011210- impl<S: State> sealed::Sealed for SetHandle<S> {}
1121111211- impl<S: State> State for SetHandle<S> {
1121211213 type IndexedAt = S::IndexedAt;
1121311213- type RelatedRecords = S::RelatedRecords;
1121411214 type Moderation = S::Moderation;
1121511215 type Did = S::Did;
1121611216- type Handle = Set<members::handle>;
1121611216+ type RelatedRecords = Set<members::related_records>;
1121711217 }
1121811218 /// Marker types for field names
1121911219 #[allow(non_camel_case_types)]
1122011220 pub mod members {
1122111221+ ///Marker type for the `handle` field
1122211222+ pub struct handle(());
1122111223 ///Marker type for the `indexed_at` field
1122211224 pub struct indexed_at(());
1122311223- ///Marker type for the `related_records` field
1122411224- pub struct related_records(());
1122511225 ///Marker type for the `moderation` field
1122611226 pub struct moderation(());
1122711227 ///Marker type for the `did` field
1122811228 pub struct did(());
1122911229- ///Marker type for the `handle` field
1123011230- pub struct handle(());
1122911229+ ///Marker type for the `related_records` field
1123011230+ pub struct related_records(());
1123111231 }
1123211232}
1123311233···1154611546impl<'a, S> RepoViewDetailBuilder<'a, S>
1154711547where
1154811548 S: repo_view_detail_state::State,
1154911549+ S::Handle: repo_view_detail_state::IsSet,
1154911550 S::IndexedAt: repo_view_detail_state::IsSet,
1155011550- S::RelatedRecords: repo_view_detail_state::IsSet,
1155111551 S::Moderation: repo_view_detail_state::IsSet,
1155211552 S::Did: repo_view_detail_state::IsSet,
1155311553- S::Handle: repo_view_detail_state::IsSet,
1155311553+ S::RelatedRecords: repo_view_detail_state::IsSet,
1155411554{
1155511555 /// Build the final struct
1155611556 pub fn build(self) -> RepoViewDetail<'a> {
···1179711797 }
1179811798 /// State trait tracking which required fields have been set
1179911799 pub trait State: sealed::Sealed {
1180011800- type Did;
1180111801- type LabeledRecordCount;
1180211800 type ReportedAccountCount;
1180111801+ type LabeledRecordCount;
1180211802+ type TakendownRecordCount;
1180311803 type RecordReportCount;
1180411804- type ReportedRecordCount;
1180511805- type LabeledAccountCount;
1180611804 type AccountReportCount;
1180711807- type TakendownRecordCount;
1180811805 type TakendownAccountCount;
1180611806+ type ReportedRecordCount;
1180711807+ type LabeledAccountCount;
1180811808+ type Did;
1180911809 }
1181011810 /// Empty state - all required fields are unset
1181111811 pub struct Empty(());
1181211812 impl sealed::Sealed for Empty {}
1181311813 impl State for Empty {
1181411814- type Did = Unset;
1181411814+ type ReportedAccountCount = Unset;
1181511815 type LabeledRecordCount = Unset;
1181611816- type ReportedAccountCount = Unset;
1181611816+ type TakendownRecordCount = Unset;
1181711817 type RecordReportCount = Unset;
1181811818+ type AccountReportCount = Unset;
1181911819+ type TakendownAccountCount = Unset;
1181811820 type ReportedRecordCount = Unset;
1181911821 type LabeledAccountCount = Unset;
1182011820- type AccountReportCount = Unset;
1182111821- type TakendownRecordCount = Unset;
1182211822- type TakendownAccountCount = Unset;
1182211822+ type Did = Unset;
1182311823 }
1182411824- ///State transition - sets the `did` field to Set
1182511825- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
1182611826- impl<S: State> sealed::Sealed for SetDid<S> {}
1182711827- impl<S: State> State for SetDid<S> {
1182811828- type Did = Set<members::did>;
1182411824+ ///State transition - sets the `reported_account_count` field to Set
1182511825+ pub struct SetReportedAccountCount<S: State = Empty>(PhantomData<fn() -> S>);
1182611826+ impl<S: State> sealed::Sealed for SetReportedAccountCount<S> {}
1182711827+ impl<S: State> State for SetReportedAccountCount<S> {
1182811828+ type ReportedAccountCount = Set<members::reported_account_count>;
1182911829 type LabeledRecordCount = S::LabeledRecordCount;
1183011830- type ReportedAccountCount = S::ReportedAccountCount;
1183011830+ type TakendownRecordCount = S::TakendownRecordCount;
1183111831 type RecordReportCount = S::RecordReportCount;
1183211832- type ReportedRecordCount = S::ReportedRecordCount;
1183311833- type LabeledAccountCount = S::LabeledAccountCount;
1183411832 type AccountReportCount = S::AccountReportCount;
1183511835- type TakendownRecordCount = S::TakendownRecordCount;
1183611833 type TakendownAccountCount = S::TakendownAccountCount;
1183411834+ type ReportedRecordCount = S::ReportedRecordCount;
1183511835+ type LabeledAccountCount = S::LabeledAccountCount;
1183611836+ type Did = S::Did;
1183711837 }
1183811838 ///State transition - sets the `labeled_record_count` field to Set
1183911839 pub struct SetLabeledRecordCount<S: State = Empty>(PhantomData<fn() -> S>);
1184011840 impl<S: State> sealed::Sealed for SetLabeledRecordCount<S> {}
1184111841 impl<S: State> State for SetLabeledRecordCount<S> {
1184211842- type Did = S::Did;
1184211842+ type ReportedAccountCount = S::ReportedAccountCount;
1184311843 type LabeledRecordCount = Set<members::labeled_record_count>;
1184411844- type ReportedAccountCount = S::ReportedAccountCount;
1184411844+ type TakendownRecordCount = S::TakendownRecordCount;
1184511845 type RecordReportCount = S::RecordReportCount;
1184611846- type ReportedRecordCount = S::ReportedRecordCount;
1184711847- type LabeledAccountCount = S::LabeledAccountCount;
1184811846 type AccountReportCount = S::AccountReportCount;
1184911849- type TakendownRecordCount = S::TakendownRecordCount;
1185011847 type TakendownAccountCount = S::TakendownAccountCount;
1185111851- }
1185211852- ///State transition - sets the `reported_account_count` field to Set
1185311853- pub struct SetReportedAccountCount<S: State = Empty>(PhantomData<fn() -> S>);
1185411854- impl<S: State> sealed::Sealed for SetReportedAccountCount<S> {}
1185511855- impl<S: State> State for SetReportedAccountCount<S> {
1184811848+ type ReportedRecordCount = S::ReportedRecordCount;
1184911849+ type LabeledAccountCount = S::LabeledAccountCount;
1185611850 type Did = S::Did;
1185111851+ }
1185211852+ ///State transition - sets the `takendown_record_count` field to Set
1185311853+ pub struct SetTakendownRecordCount<S: State = Empty>(PhantomData<fn() -> S>);
1185411854+ impl<S: State> sealed::Sealed for SetTakendownRecordCount<S> {}
1185511855+ impl<S: State> State for SetTakendownRecordCount<S> {
1185611856+ type ReportedAccountCount = S::ReportedAccountCount;
1185711857 type LabeledRecordCount = S::LabeledRecordCount;
1185811858- type ReportedAccountCount = Set<members::reported_account_count>;
1185811858+ type TakendownRecordCount = Set<members::takendown_record_count>;
1185911859 type RecordReportCount = S::RecordReportCount;
1186011860- type ReportedRecordCount = S::ReportedRecordCount;
1186111861- type LabeledAccountCount = S::LabeledAccountCount;
1186211860 type AccountReportCount = S::AccountReportCount;
1186311863- type TakendownRecordCount = S::TakendownRecordCount;
1186411861 type TakendownAccountCount = S::TakendownAccountCount;
1186211862+ type ReportedRecordCount = S::ReportedRecordCount;
1186311863+ type LabeledAccountCount = S::LabeledAccountCount;
1186411864+ type Did = S::Did;
1186511865 }
1186611866 ///State transition - sets the `record_report_count` field to Set
1186711867 pub struct SetRecordReportCount<S: State = Empty>(PhantomData<fn() -> S>);
1186811868 impl<S: State> sealed::Sealed for SetRecordReportCount<S> {}
1186911869 impl<S: State> State for SetRecordReportCount<S> {
1187011870- type Did = S::Did;
1187111871- type LabeledRecordCount = S::LabeledRecordCount;
1187211870 type ReportedAccountCount = S::ReportedAccountCount;
1187111871+ type LabeledRecordCount = S::LabeledRecordCount;
1187211872+ type TakendownRecordCount = S::TakendownRecordCount;
1187311873 type RecordReportCount = Set<members::record_report_count>;
1187411874+ type AccountReportCount = S::AccountReportCount;
1187511875+ type TakendownAccountCount = S::TakendownAccountCount;
1187411876 type ReportedRecordCount = S::ReportedRecordCount;
1187511877 type LabeledAccountCount = S::LabeledAccountCount;
1187611876- type AccountReportCount = S::AccountReportCount;
1187811878+ type Did = S::Did;
1187911879+ }
1188011880+ ///State transition - sets the `account_report_count` field to Set
1188111881+ pub struct SetAccountReportCount<S: State = Empty>(PhantomData<fn() -> S>);
1188211882+ impl<S: State> sealed::Sealed for SetAccountReportCount<S> {}
1188311883+ impl<S: State> State for SetAccountReportCount<S> {
1188411884+ type ReportedAccountCount = S::ReportedAccountCount;
1188511885+ type LabeledRecordCount = S::LabeledRecordCount;
1187711886 type TakendownRecordCount = S::TakendownRecordCount;
1188711887+ type RecordReportCount = S::RecordReportCount;
1188811888+ type AccountReportCount = Set<members::account_report_count>;
1187811889 type TakendownAccountCount = S::TakendownAccountCount;
1189011890+ type ReportedRecordCount = S::ReportedRecordCount;
1189111891+ type LabeledAccountCount = S::LabeledAccountCount;
1189211892+ type Did = S::Did;
1189311893+ }
1189411894+ ///State transition - sets the `takendown_account_count` field to Set
1189511895+ pub struct SetTakendownAccountCount<S: State = Empty>(PhantomData<fn() -> S>);
1189611896+ impl<S: State> sealed::Sealed for SetTakendownAccountCount<S> {}
1189711897+ impl<S: State> State for SetTakendownAccountCount<S> {
1189811898+ type ReportedAccountCount = S::ReportedAccountCount;
1189911899+ type LabeledRecordCount = S::LabeledRecordCount;
1190011900+ type TakendownRecordCount = S::TakendownRecordCount;
1190111901+ type RecordReportCount = S::RecordReportCount;
1190211902+ type AccountReportCount = S::AccountReportCount;
1190311903+ type TakendownAccountCount = Set<members::takendown_account_count>;
1190411904+ type ReportedRecordCount = S::ReportedRecordCount;
1190511905+ type LabeledAccountCount = S::LabeledAccountCount;
1190611906+ type Did = S::Did;
1187911907 }
1188011908 ///State transition - sets the `reported_record_count` field to Set
1188111909 pub struct SetReportedRecordCount<S: State = Empty>(PhantomData<fn() -> S>);
1188211910 impl<S: State> sealed::Sealed for SetReportedRecordCount<S> {}
1188311911 impl<S: State> State for SetReportedRecordCount<S> {
1188411884- type Did = S::Did;
1191211912+ type ReportedAccountCount = S::ReportedAccountCount;
1188511913 type LabeledRecordCount = S::LabeledRecordCount;
1188611886- type ReportedAccountCount = S::ReportedAccountCount;
1191411914+ type TakendownRecordCount = S::TakendownRecordCount;
1188711915 type RecordReportCount = S::RecordReportCount;
1188811888- type ReportedRecordCount = Set<members::reported_record_count>;
1188911889- type LabeledAccountCount = S::LabeledAccountCount;
1189011916 type AccountReportCount = S::AccountReportCount;
1189111891- type TakendownRecordCount = S::TakendownRecordCount;
1189211917 type TakendownAccountCount = S::TakendownAccountCount;
1191811918+ type ReportedRecordCount = Set<members::reported_record_count>;
1191911919+ type LabeledAccountCount = S::LabeledAccountCount;
1192011920+ type Did = S::Did;
1189311921 }
1189411922 ///State transition - sets the `labeled_account_count` field to Set
1189511923 pub struct SetLabeledAccountCount<S: State = Empty>(PhantomData<fn() -> S>);
1189611924 impl<S: State> sealed::Sealed for SetLabeledAccountCount<S> {}
1189711925 impl<S: State> State for SetLabeledAccountCount<S> {
1189811898- type Did = S::Did;
1189911899- type LabeledRecordCount = S::LabeledRecordCount;
1190011926 type ReportedAccountCount = S::ReportedAccountCount;
1192711927+ type LabeledRecordCount = S::LabeledRecordCount;
1192811928+ type TakendownRecordCount = S::TakendownRecordCount;
1190111929 type RecordReportCount = S::RecordReportCount;
1193011930+ type AccountReportCount = S::AccountReportCount;
1193111931+ type TakendownAccountCount = S::TakendownAccountCount;
1190211932 type ReportedRecordCount = S::ReportedRecordCount;
1190311933 type LabeledAccountCount = Set<members::labeled_account_count>;
1190411904- type AccountReportCount = S::AccountReportCount;
1190511905- type TakendownRecordCount = S::TakendownRecordCount;
1190611906- type TakendownAccountCount = S::TakendownAccountCount;
1193411934+ type Did = S::Did;
1190711935 }
1190811908- ///State transition - sets the `account_report_count` field to Set
1190911909- pub struct SetAccountReportCount<S: State = Empty>(PhantomData<fn() -> S>);
1191011910- impl<S: State> sealed::Sealed for SetAccountReportCount<S> {}
1191111911- impl<S: State> State for SetAccountReportCount<S> {
1191211912- type Did = S::Did;
1191311913- type LabeledRecordCount = S::LabeledRecordCount;
1193611936+ ///State transition - sets the `did` field to Set
1193711937+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
1193811938+ impl<S: State> sealed::Sealed for SetDid<S> {}
1193911939+ impl<S: State> State for SetDid<S> {
1191411940 type ReportedAccountCount = S::ReportedAccountCount;
1191511915- type RecordReportCount = S::RecordReportCount;
1191611916- type ReportedRecordCount = S::ReportedRecordCount;
1191711917- type LabeledAccountCount = S::LabeledAccountCount;
1191811918- type AccountReportCount = Set<members::account_report_count>;
1194111941+ type LabeledRecordCount = S::LabeledRecordCount;
1191911942 type TakendownRecordCount = S::TakendownRecordCount;
1192011920- type TakendownAccountCount = S::TakendownAccountCount;
1192111921- }
1192211922- ///State transition - sets the `takendown_record_count` field to Set
1192311923- pub struct SetTakendownRecordCount<S: State = Empty>(PhantomData<fn() -> S>);
1192411924- impl<S: State> sealed::Sealed for SetTakendownRecordCount<S> {}
1192511925- impl<S: State> State for SetTakendownRecordCount<S> {
1192611926- type Did = S::Did;
1192711927- type LabeledRecordCount = S::LabeledRecordCount;
1192811928- type ReportedAccountCount = S::ReportedAccountCount;
1192911943 type RecordReportCount = S::RecordReportCount;
1193011930- type ReportedRecordCount = S::ReportedRecordCount;
1193111931- type LabeledAccountCount = S::LabeledAccountCount;
1193211944 type AccountReportCount = S::AccountReportCount;
1193311933- type TakendownRecordCount = Set<members::takendown_record_count>;
1193411945 type TakendownAccountCount = S::TakendownAccountCount;
1193511935- }
1193611936- ///State transition - sets the `takendown_account_count` field to Set
1193711937- pub struct SetTakendownAccountCount<S: State = Empty>(PhantomData<fn() -> S>);
1193811938- impl<S: State> sealed::Sealed for SetTakendownAccountCount<S> {}
1193911939- impl<S: State> State for SetTakendownAccountCount<S> {
1194011940- type Did = S::Did;
1194111941- type LabeledRecordCount = S::LabeledRecordCount;
1194211942- type ReportedAccountCount = S::ReportedAccountCount;
1194311943- type RecordReportCount = S::RecordReportCount;
1194411946 type ReportedRecordCount = S::ReportedRecordCount;
1194511947 type LabeledAccountCount = S::LabeledAccountCount;
1194611946- type AccountReportCount = S::AccountReportCount;
1194711947- type TakendownRecordCount = S::TakendownRecordCount;
1194811948- type TakendownAccountCount = Set<members::takendown_account_count>;
1194811948+ type Did = Set<members::did>;
1194911949 }
1195011950 /// Marker types for field names
1195111951 #[allow(non_camel_case_types)]
1195211952 pub mod members {
1195311953- ///Marker type for the `did` field
1195411954- pub struct did(());
1195311953+ ///Marker type for the `reported_account_count` field
1195411954+ pub struct reported_account_count(());
1195511955 ///Marker type for the `labeled_record_count` field
1195611956 pub struct labeled_record_count(());
1195711957- ///Marker type for the `reported_account_count` field
1195811958- pub struct reported_account_count(());
1195711957+ ///Marker type for the `takendown_record_count` field
1195811958+ pub struct takendown_record_count(());
1195911959 ///Marker type for the `record_report_count` field
1196011960 pub struct record_report_count(());
1196111961- ///Marker type for the `reported_record_count` field
1196211962- pub struct reported_record_count(());
1196311963- ///Marker type for the `labeled_account_count` field
1196411964- pub struct labeled_account_count(());
1196511961 ///Marker type for the `account_report_count` field
1196611962 pub struct account_report_count(());
1196711967- ///Marker type for the `takendown_record_count` field
1196811968- pub struct takendown_record_count(());
1196911963 ///Marker type for the `takendown_account_count` field
1197011964 pub struct takendown_account_count(());
1196511965+ ///Marker type for the `reported_record_count` field
1196611966+ pub struct reported_record_count(());
1196711967+ ///Marker type for the `labeled_account_count` field
1196811968+ pub struct labeled_account_count(());
1196911969+ ///Marker type for the `did` field
1197011970+ pub struct did(());
1197111971 }
1197211972}
1197311973···1219012190impl<'a, S> ReporterStatsBuilder<'a, S>
1219112191where
1219212192 S: reporter_stats_state::State,
1219312193- S::Did: reporter_stats_state::IsSet,
1219412194- S::LabeledRecordCount: reporter_stats_state::IsSet,
1219512193 S::ReportedAccountCount: reporter_stats_state::IsSet,
1219412194+ S::LabeledRecordCount: reporter_stats_state::IsSet,
1219512195+ S::TakendownRecordCount: reporter_stats_state::IsSet,
1219612196 S::RecordReportCount: reporter_stats_state::IsSet,
1219712197- S::ReportedRecordCount: reporter_stats_state::IsSet,
1219812198- S::LabeledAccountCount: reporter_stats_state::IsSet,
1219912197 S::AccountReportCount: reporter_stats_state::IsSet,
1220012200- S::TakendownRecordCount: reporter_stats_state::IsSet,
1220112198 S::TakendownAccountCount: reporter_stats_state::IsSet,
1219912199+ S::ReportedRecordCount: reporter_stats_state::IsSet,
1220012200+ S::LabeledAccountCount: reporter_stats_state::IsSet,
1220112201+ S::Did: reporter_stats_state::IsSet,
1220212202{
1220312203 /// Build the final struct
1220412204 pub fn build(self) -> ReporterStats<'a> {
···1247612476 }
1247712477 /// State trait tracking which required fields have been set
1247812478 pub trait State: sealed::Sealed {
1247912479- type CreatedBy;
1248012479 type CreatedAt;
1248112480 type Status;
1248212481 type Id;
1248312482 type Did;
1248412483 type Action;
1248412484+ type CreatedBy;
1248512485 }
1248612486 /// Empty state - all required fields are unset
1248712487 pub struct Empty(());
1248812488 impl sealed::Sealed for Empty {}
1248912489 impl State for Empty {
1249012490- type CreatedBy = Unset;
1249112490 type CreatedAt = Unset;
1249212491 type Status = Unset;
1249312492 type Id = Unset;
1249412493 type Did = Unset;
1249512494 type Action = Unset;
1249612496- }
1249712497- ///State transition - sets the `created_by` field to Set
1249812498- pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
1249912499- impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
1250012500- impl<S: State> State for SetCreatedBy<S> {
1250112501- type CreatedBy = Set<members::created_by>;
1250212502- type CreatedAt = S::CreatedAt;
1250312503- type Status = S::Status;
1250412504- type Id = S::Id;
1250512505- type Did = S::Did;
1250612506- type Action = S::Action;
1249512495+ type CreatedBy = Unset;
1250712496 }
1250812497 ///State transition - sets the `created_at` field to Set
1250912498 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
1251012499 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
1251112500 impl<S: State> State for SetCreatedAt<S> {
1251212512- type CreatedBy = S::CreatedBy;
1251312501 type CreatedAt = Set<members::created_at>;
1251412502 type Status = S::Status;
1251512503 type Id = S::Id;
1251612504 type Did = S::Did;
1251712505 type Action = S::Action;
1250612506+ type CreatedBy = S::CreatedBy;
1251812507 }
1251912508 ///State transition - sets the `status` field to Set
1252012509 pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
1252112510 impl<S: State> sealed::Sealed for SetStatus<S> {}
1252212511 impl<S: State> State for SetStatus<S> {
1252312523- type CreatedBy = S::CreatedBy;
1252412512 type CreatedAt = S::CreatedAt;
1252512513 type Status = Set<members::status>;
1252612514 type Id = S::Id;
1252712515 type Did = S::Did;
1252812516 type Action = S::Action;
1251712517+ type CreatedBy = S::CreatedBy;
1252912518 }
1253012519 ///State transition - sets the `id` field to Set
1253112520 pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
1253212521 impl<S: State> sealed::Sealed for SetId<S> {}
1253312522 impl<S: State> State for SetId<S> {
1253412534- type CreatedBy = S::CreatedBy;
1253512523 type CreatedAt = S::CreatedAt;
1253612524 type Status = S::Status;
1253712525 type Id = Set<members::id>;
1253812526 type Did = S::Did;
1253912527 type Action = S::Action;
1252812528+ type CreatedBy = S::CreatedBy;
1254012529 }
1254112530 ///State transition - sets the `did` field to Set
1254212531 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
1254312532 impl<S: State> sealed::Sealed for SetDid<S> {}
1254412533 impl<S: State> State for SetDid<S> {
1254512545- type CreatedBy = S::CreatedBy;
1254612534 type CreatedAt = S::CreatedAt;
1254712535 type Status = S::Status;
1254812536 type Id = S::Id;
1254912537 type Did = Set<members::did>;
1255012538 type Action = S::Action;
1253912539+ type CreatedBy = S::CreatedBy;
1255112540 }
1255212541 ///State transition - sets the `action` field to Set
1255312542 pub struct SetAction<S: State = Empty>(PhantomData<fn() -> S>);
1255412543 impl<S: State> sealed::Sealed for SetAction<S> {}
1255512544 impl<S: State> State for SetAction<S> {
1254512545+ type CreatedAt = S::CreatedAt;
1254612546+ type Status = S::Status;
1254712547+ type Id = S::Id;
1254812548+ type Did = S::Did;
1254912549+ type Action = Set<members::action>;
1255612550 type CreatedBy = S::CreatedBy;
1255112551+ }
1255212552+ ///State transition - sets the `created_by` field to Set
1255312553+ pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
1255412554+ impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
1255512555+ impl<S: State> State for SetCreatedBy<S> {
1255712556 type CreatedAt = S::CreatedAt;
1255812557 type Status = S::Status;
1255912558 type Id = S::Id;
1256012559 type Did = S::Did;
1256112561- type Action = Set<members::action>;
1256012560+ type Action = S::Action;
1256112561+ type CreatedBy = Set<members::created_by>;
1256212562 }
1256312563 /// Marker types for field names
1256412564 #[allow(non_camel_case_types)]
1256512565 pub mod members {
1256612566- ///Marker type for the `created_by` field
1256712567- pub struct created_by(());
1256812566 ///Marker type for the `created_at` field
1256912567 pub struct created_at(());
1257012568 ///Marker type for the `status` field
···1257512573 pub struct did(());
1257612574 ///Marker type for the `action` field
1257712575 pub struct action(());
1257612576+ ///Marker type for the `created_by` field
1257712577+ pub struct created_by(());
1257812578 }
1257912579}
1258012580···1291112911impl<'a, S> ScheduledActionViewBuilder<'a, S>
1291212912where
1291312913 S: scheduled_action_view_state::State,
1291412914- S::CreatedBy: scheduled_action_view_state::IsSet,
1291512914 S::CreatedAt: scheduled_action_view_state::IsSet,
1291612915 S::Status: scheduled_action_view_state::IsSet,
1291712916 S::Id: scheduled_action_view_state::IsSet,
1291812917 S::Did: scheduled_action_view_state::IsSet,
1291912918 S::Action: scheduled_action_view_state::IsSet,
1291912919+ S::CreatedBy: scheduled_action_view_state::IsSet,
1292012920{
1292112921 /// Build the final struct
1292212922 pub fn build(self) -> ScheduledActionView<'a> {
···1340213402 /// State trait tracking which required fields have been set
1340313403 pub trait State: sealed::Sealed {
1340413404 type Id;
1340513405- type Subject;
1340613406- type UpdatedAt;
1340713407- type ReviewState;
1340813405 type CreatedAt;
1340613406+ type ReviewState;
1340713407+ type UpdatedAt;
1340813408+ type Subject;
1340913409 }
1341013410 /// Empty state - all required fields are unset
1341113411 pub struct Empty(());
1341213412 impl sealed::Sealed for Empty {}
1341313413 impl State for Empty {
1341413414 type Id = Unset;
1341513415+ type CreatedAt = Unset;
1341613416+ type ReviewState = Unset;
1341713417+ type UpdatedAt = Unset;
1341513418 type Subject = Unset;
1341613416- type UpdatedAt = Unset;
1341713417- type ReviewState = Unset;
1341813418- type CreatedAt = Unset;
1341913419 }
1342013420 ///State transition - sets the `id` field to Set
1342113421 pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
1342213422 impl<S: State> sealed::Sealed for SetId<S> {}
1342313423 impl<S: State> State for SetId<S> {
1342413424 type Id = Set<members::id>;
1342513425- type Subject = S::Subject;
1342513425+ type CreatedAt = S::CreatedAt;
1342613426+ type ReviewState = S::ReviewState;
1342613427 type UpdatedAt = S::UpdatedAt;
1342813428+ type Subject = S::Subject;
1342913429+ }
1343013430+ ///State transition - sets the `created_at` field to Set
1343113431+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
1343213432+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
1343313433+ impl<S: State> State for SetCreatedAt<S> {
1343413434+ type Id = S::Id;
1343513435+ type CreatedAt = Set<members::created_at>;
1342713436 type ReviewState = S::ReviewState;
1342813428- type CreatedAt = S::CreatedAt;
1343713437+ type UpdatedAt = S::UpdatedAt;
1343813438+ type Subject = S::Subject;
1342913439 }
1343013430- ///State transition - sets the `subject` field to Set
1343113431- pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
1343213432- impl<S: State> sealed::Sealed for SetSubject<S> {}
1343313433- impl<S: State> State for SetSubject<S> {
1344013440+ ///State transition - sets the `review_state` field to Set
1344113441+ pub struct SetReviewState<S: State = Empty>(PhantomData<fn() -> S>);
1344213442+ impl<S: State> sealed::Sealed for SetReviewState<S> {}
1344313443+ impl<S: State> State for SetReviewState<S> {
1343413444 type Id = S::Id;
1343513435- type Subject = Set<members::subject>;
1344513445+ type CreatedAt = S::CreatedAt;
1344613446+ type ReviewState = Set<members::review_state>;
1343613447 type UpdatedAt = S::UpdatedAt;
1343713437- type ReviewState = S::ReviewState;
1343813438- type CreatedAt = S::CreatedAt;
1344813448+ type Subject = S::Subject;
1343913449 }
1344013450 ///State transition - sets the `updated_at` field to Set
1344113451 pub struct SetUpdatedAt<S: State = Empty>(PhantomData<fn() -> S>);
1344213452 impl<S: State> sealed::Sealed for SetUpdatedAt<S> {}
1344313453 impl<S: State> State for SetUpdatedAt<S> {
1344413454 type Id = S::Id;
1344513445- type Subject = S::Subject;
1345513455+ type CreatedAt = S::CreatedAt;
1345613456+ type ReviewState = S::ReviewState;
1344613457 type UpdatedAt = Set<members::updated_at>;
1344713447- type ReviewState = S::ReviewState;
1344813448- type CreatedAt = S::CreatedAt;
1345813458+ type Subject = S::Subject;
1344913459 }
1345013450- ///State transition - sets the `review_state` field to Set
1345113451- pub struct SetReviewState<S: State = Empty>(PhantomData<fn() -> S>);
1345213452- impl<S: State> sealed::Sealed for SetReviewState<S> {}
1345313453- impl<S: State> State for SetReviewState<S> {
1346013460+ ///State transition - sets the `subject` field to Set
1346113461+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
1346213462+ impl<S: State> sealed::Sealed for SetSubject<S> {}
1346313463+ impl<S: State> State for SetSubject<S> {
1345413464 type Id = S::Id;
1345513455- type Subject = S::Subject;
1345613456- type UpdatedAt = S::UpdatedAt;
1345713457- type ReviewState = Set<members::review_state>;
1345813465 type CreatedAt = S::CreatedAt;
1345913459- }
1346013460- ///State transition - sets the `created_at` field to Set
1346113461- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
1346213462- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
1346313463- impl<S: State> State for SetCreatedAt<S> {
1346413464- type Id = S::Id;
1346513465- type Subject = S::Subject;
1346613466- type UpdatedAt = S::UpdatedAt;
1346713466 type ReviewState = S::ReviewState;
1346813468- type CreatedAt = Set<members::created_at>;
1346713467+ type UpdatedAt = S::UpdatedAt;
1346813468+ type Subject = Set<members::subject>;
1346913469 }
1347013470 /// Marker types for field names
1347113471 #[allow(non_camel_case_types)]
1347213472 pub mod members {
1347313473 ///Marker type for the `id` field
1347413474 pub struct id(());
1347513475+ ///Marker type for the `created_at` field
1347613476+ pub struct created_at(());
1347713477+ ///Marker type for the `review_state` field
1347813478+ pub struct review_state(());
1347913479+ ///Marker type for the `updated_at` field
1348013480+ pub struct updated_at(());
1347513481 ///Marker type for the `subject` field
1347613482 pub struct subject(());
1347713477- ///Marker type for the `updated_at` field
1347813478- pub struct updated_at(());
1347913479- ///Marker type for the `review_state` field
1348013480- pub struct review_state(());
1348113481- ///Marker type for the `created_at` field
1348213482- pub struct created_at(());
1348313483 }
1348413484}
1348513485···1401514015where
1401614016 S: subject_status_view_state::State,
1401714017 S::Id: subject_status_view_state::IsSet,
1401814018- S::Subject: subject_status_view_state::IsSet,
1401914019- S::UpdatedAt: subject_status_view_state::IsSet,
1402014020- S::ReviewState: subject_status_view_state::IsSet,
1402114018 S::CreatedAt: subject_status_view_state::IsSet,
1401914019+ S::ReviewState: subject_status_view_state::IsSet,
1402014020+ S::UpdatedAt: subject_status_view_state::IsSet,
1402114021+ S::Subject: subject_status_view_state::IsSet,
1402214022{
1402314023 /// Build the final struct
1402414024 pub fn build(self) -> SubjectStatusView<'a> {
···1474114741 }
1474214742 /// State trait tracking which required fields have been set
1474314743 pub trait State: sealed::Sealed {
1474414744- type Length;
1474514745- type Width;
1474614744 type Height;
1474514745+ type Width;
1474614746+ type Length;
1474714747 }
1474814748 /// Empty state - all required fields are unset
1474914749 pub struct Empty(());
1475014750 impl sealed::Sealed for Empty {}
1475114751 impl State for Empty {
1475214752+ type Height = Unset;
1475314753+ type Width = Unset;
1475214754 type Length = Unset;
1475314753- type Width = Unset;
1475414754- type Height = Unset;
1475514755 }
1475614756- ///State transition - sets the `length` field to Set
1475714757- pub struct SetLength<S: State = Empty>(PhantomData<fn() -> S>);
1475814758- impl<S: State> sealed::Sealed for SetLength<S> {}
1475914759- impl<S: State> State for SetLength<S> {
1476014760- type Length = Set<members::length>;
1475614756+ ///State transition - sets the `height` field to Set
1475714757+ pub struct SetHeight<S: State = Empty>(PhantomData<fn() -> S>);
1475814758+ impl<S: State> sealed::Sealed for SetHeight<S> {}
1475914759+ impl<S: State> State for SetHeight<S> {
1476014760+ type Height = Set<members::height>;
1476114761 type Width = S::Width;
1476214762- type Height = S::Height;
1476214762+ type Length = S::Length;
1476314763 }
1476414764 ///State transition - sets the `width` field to Set
1476514765 pub struct SetWidth<S: State = Empty>(PhantomData<fn() -> S>);
1476614766 impl<S: State> sealed::Sealed for SetWidth<S> {}
1476714767 impl<S: State> State for SetWidth<S> {
1476814768- type Length = S::Length;
1476914769- type Width = Set<members::width>;
1477014768 type Height = S::Height;
1476914769+ type Width = Set<members::width>;
1477014770+ type Length = S::Length;
1477114771 }
1477214772- ///State transition - sets the `height` field to Set
1477314773- pub struct SetHeight<S: State = Empty>(PhantomData<fn() -> S>);
1477414774- impl<S: State> sealed::Sealed for SetHeight<S> {}
1477514775- impl<S: State> State for SetHeight<S> {
1477614776- type Length = S::Length;
1477214772+ ///State transition - sets the `length` field to Set
1477314773+ pub struct SetLength<S: State = Empty>(PhantomData<fn() -> S>);
1477414774+ impl<S: State> sealed::Sealed for SetLength<S> {}
1477514775+ impl<S: State> State for SetLength<S> {
1477614776+ type Height = S::Height;
1477714777 type Width = S::Width;
1477814778- type Height = Set<members::height>;
1477814778+ type Length = Set<members::length>;
1477914779 }
1478014780 /// Marker types for field names
1478114781 #[allow(non_camel_case_types)]
1478214782 pub mod members {
1478314783+ ///Marker type for the `height` field
1478414784+ pub struct height(());
1478514785+ ///Marker type for the `width` field
1478614786+ pub struct width(());
1478314787 ///Marker type for the `length` field
1478414788 pub struct length(());
1478514785- ///Marker type for the `width` field
1478614786- pub struct width(());
1478714787- ///Marker type for the `height` field
1478814788- pub struct height(());
1478914789 }
1479014790}
1479114791···1487814878impl<'a, S> VideoDetailsBuilder<'a, S>
1487914879where
1488014880 S: video_details_state::State,
1488114881- S::Length: video_details_state::IsSet,
1488214882- S::Width: video_details_state::IsSet,
1488314881 S::Height: video_details_state::IsSet,
1488214882+ S::Width: video_details_state::IsSet,
1488314883+ S::Length: video_details_state::IsSet,
1488414884{
1488514885 /// Build the final struct
1488614886 pub fn build(self) -> VideoDetails<'a> {
···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> {
···219219 }
220220 /// State trait tracking which required fields have been set
221221 pub trait State: sealed::Sealed {
222222- type Day;
223222 type Summary;
223223+ type Day;
224224 }
225225 /// Empty state - all required fields are unset
226226 pub struct Empty(());
227227 impl sealed::Sealed for Empty {}
228228 impl State for Empty {
229229- type Day = Unset;
230229 type Summary = Unset;
231231- }
232232- ///State transition - sets the `day` field to Set
233233- pub struct SetDay<S: State = Empty>(PhantomData<fn() -> S>);
234234- impl<S: State> sealed::Sealed for SetDay<S> {}
235235- impl<S: State> State for SetDay<S> {
236236- type Day = Set<members::day>;
237237- type Summary = S::Summary;
230230+ type Day = Unset;
238231 }
239232 ///State transition - sets the `summary` field to Set
240233 pub struct SetSummary<S: State = Empty>(PhantomData<fn() -> S>);
241234 impl<S: State> sealed::Sealed for SetSummary<S> {}
242235 impl<S: State> State for SetSummary<S> {
243243- type Day = S::Day;
244236 type Summary = Set<members::summary>;
237237+ type Day = S::Day;
238238+ }
239239+ ///State transition - sets the `day` field to Set
240240+ pub struct SetDay<S: State = Empty>(PhantomData<fn() -> S>);
241241+ impl<S: State> sealed::Sealed for SetDay<S> {}
242242+ impl<S: State> State for SetDay<S> {
243243+ type Summary = S::Summary;
244244+ type Day = Set<members::day>;
245245 }
246246 /// Marker types for field names
247247 #[allow(non_camel_case_types)]
248248 pub mod members {
249249- ///Marker type for the `day` field
250250- pub struct day(());
251249 ///Marker type for the `summary` field
252250 pub struct summary(());
251251+ ///Marker type for the `day` field
252252+ pub struct day(());
253253 }
254254}
255255···334334impl<'a, S> TimelineItemBuilder<'a, S>
335335where
336336 S: timeline_item_state::State,
337337- S::Day: timeline_item_state::IsSet,
338337 S::Summary: timeline_item_state::IsSet,
338338+ S::Day: timeline_item_state::IsSet,
339339{
340340 /// Build the final struct
341341 pub fn build(self) -> TimelineItem<'a> {
···576576 /// State trait tracking which required fields have been set
577577 pub trait State: sealed::Sealed {
578578 type EventSubjectType;
579579- type EventType;
580579 type Count;
580580+ type EventType;
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 EventSubjectType = Unset;
587587- type EventType = Unset;
588587 type Count = Unset;
588588+ type EventType = Unset;
589589 }
590590 ///State transition - sets the `event_subject_type` field to Set
591591 pub struct SetEventSubjectType<S: State = Empty>(PhantomData<fn() -> S>);
592592 impl<S: State> sealed::Sealed for SetEventSubjectType<S> {}
593593 impl<S: State> State for SetEventSubjectType<S> {
594594 type EventSubjectType = Set<members::event_subject_type>;
595595- type EventType = S::EventType;
596595 type Count = S::Count;
597597- }
598598- ///State transition - sets the `event_type` field to Set
599599- pub struct SetEventType<S: State = Empty>(PhantomData<fn() -> S>);
600600- impl<S: State> sealed::Sealed for SetEventType<S> {}
601601- impl<S: State> State for SetEventType<S> {
602602- type EventSubjectType = S::EventSubjectType;
603603- type EventType = Set<members::event_type>;
604604- type Count = S::Count;
596596+ type EventType = S::EventType;
605597 }
606598 ///State transition - sets the `count` field to Set
607599 pub struct SetCount<S: State = Empty>(PhantomData<fn() -> S>);
608600 impl<S: State> sealed::Sealed for SetCount<S> {}
609601 impl<S: State> State for SetCount<S> {
610602 type EventSubjectType = S::EventSubjectType;
611611- type EventType = S::EventType;
612603 type Count = Set<members::count>;
604604+ type EventType = S::EventType;
605605+ }
606606+ ///State transition - sets the `event_type` field to Set
607607+ pub struct SetEventType<S: State = Empty>(PhantomData<fn() -> S>);
608608+ impl<S: State> sealed::Sealed for SetEventType<S> {}
609609+ impl<S: State> State for SetEventType<S> {
610610+ type EventSubjectType = S::EventSubjectType;
611611+ type Count = S::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 `event_subject_type` field
618618 pub struct event_subject_type(());
619619- ///Marker type for the `event_type` field
620620- pub struct event_type(());
621619 ///Marker type for the `count` field
622620 pub struct count(());
621621+ ///Marker type for the `event_type` field
622622+ pub struct event_type(());
623623 }
624624}
625625···716716where
717717 S: timeline_item_summary_state::State,
718718 S::EventSubjectType: timeline_item_summary_state::IsSet,
719719- S::EventType: timeline_item_summary_state::IsSet,
720719 S::Count: timeline_item_summary_state::IsSet,
720720+ S::EventType: timeline_item_summary_state::IsSet,
721721{
722722 /// Build the final struct
723723 pub fn build(self) -> TimelineItemSummary<'a> {
···761761 }
762762 /// State trait tracking which required fields have been set
763763 pub trait State: sealed::Sealed {
764764+ type Subjects;
764765 type Action;
765766 type Scheduling;
766766- type Subjects;
767767 type CreatedBy;
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 Subjects = Unset;
773774 type Action = Unset;
774775 type Scheduling = Unset;
775775- type Subjects = Unset;
776776 type CreatedBy = Unset;
777777 }
778778+ ///State transition - sets the `subjects` field to Set
779779+ pub struct SetSubjects<S: State = Empty>(PhantomData<fn() -> S>);
780780+ impl<S: State> sealed::Sealed for SetSubjects<S> {}
781781+ impl<S: State> State for SetSubjects<S> {
782782+ type Subjects = Set<members::subjects>;
783783+ type Action = S::Action;
784784+ type Scheduling = S::Scheduling;
785785+ type CreatedBy = S::CreatedBy;
786786+ }
778787 ///State transition - sets the `action` field to Set
779788 pub struct SetAction<S: State = Empty>(PhantomData<fn() -> S>);
780789 impl<S: State> sealed::Sealed for SetAction<S> {}
781790 impl<S: State> State for SetAction<S> {
791791+ type Subjects = S::Subjects;
782792 type Action = Set<members::action>;
783793 type Scheduling = S::Scheduling;
784784- type Subjects = S::Subjects;
785794 type CreatedBy = S::CreatedBy;
786795 }
787796 ///State transition - sets the `scheduling` field to Set
788797 pub struct SetScheduling<S: State = Empty>(PhantomData<fn() -> S>);
789798 impl<S: State> sealed::Sealed for SetScheduling<S> {}
790799 impl<S: State> State for SetScheduling<S> {
800800+ type Subjects = S::Subjects;
791801 type Action = S::Action;
792802 type Scheduling = Set<members::scheduling>;
793793- type Subjects = S::Subjects;
794794- type CreatedBy = S::CreatedBy;
795795- }
796796- ///State transition - sets the `subjects` field to Set
797797- pub struct SetSubjects<S: State = Empty>(PhantomData<fn() -> S>);
798798- impl<S: State> sealed::Sealed for SetSubjects<S> {}
799799- impl<S: State> State for SetSubjects<S> {
800800- type Action = S::Action;
801801- type Scheduling = S::Scheduling;
802802- type Subjects = Set<members::subjects>;
803803 type CreatedBy = S::CreatedBy;
804804 }
805805 ///State transition - sets the `created_by` field to Set
806806 pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
807807 impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
808808 impl<S: State> State for SetCreatedBy<S> {
809809+ type Subjects = S::Subjects;
809810 type Action = S::Action;
810811 type Scheduling = S::Scheduling;
811811- type Subjects = S::Subjects;
812812 type CreatedBy = Set<members::created_by>;
813813 }
814814 /// Marker types for field names
815815 #[allow(non_camel_case_types)]
816816 pub mod members {
817817+ ///Marker type for the `subjects` field
818818+ pub struct subjects(());
817819 ///Marker type for the `action` field
818820 pub struct action(());
819821 ///Marker type for the `scheduling` field
820822 pub struct scheduling(());
821821- ///Marker type for the `subjects` field
822822- pub struct subjects(());
823823 ///Marker type for the `created_by` field
824824 pub struct created_by(());
825825 }
···960960impl<'a, S> ScheduleActionBuilder<'a, S>
961961where
962962 S: schedule_action_state::State,
963963+ S::Subjects: schedule_action_state::IsSet,
963964 S::Action: schedule_action_state::IsSet,
964965 S::Scheduling: schedule_action_state::IsSet,
965965- S::Subjects: schedule_action_state::IsSet,
966966 S::CreatedBy: schedule_action_state::IsSet,
967967{
968968 /// Build the final struct
···10721072 }
10731073 /// State trait tracking which required fields have been set
10741074 pub trait State: sealed::Sealed {
10751075- type Failed;
10761075 type Succeeded;
10761076+ type Failed;
10771077 }
10781078 /// Empty state - all required fields are unset
10791079 pub struct Empty(());
10801080 impl sealed::Sealed for Empty {}
10811081 impl State for Empty {
10821082- type Failed = Unset;
10831082 type Succeeded = Unset;
10841084- }
10851085- ///State transition - sets the `failed` field to Set
10861086- pub struct SetFailed<S: State = Empty>(PhantomData<fn() -> S>);
10871087- impl<S: State> sealed::Sealed for SetFailed<S> {}
10881088- impl<S: State> State for SetFailed<S> {
10891089- type Failed = Set<members::failed>;
10901090- type Succeeded = S::Succeeded;
10831083+ type Failed = Unset;
10911084 }
10921085 ///State transition - sets the `succeeded` field to Set
10931086 pub struct SetSucceeded<S: State = Empty>(PhantomData<fn() -> S>);
10941087 impl<S: State> sealed::Sealed for SetSucceeded<S> {}
10951088 impl<S: State> State for SetSucceeded<S> {
10891089+ type Succeeded = Set<members::succeeded>;
10961090 type Failed = S::Failed;
10971097- type Succeeded = Set<members::succeeded>;
10911091+ }
10921092+ ///State transition - sets the `failed` field to Set
10931093+ pub struct SetFailed<S: State = Empty>(PhantomData<fn() -> S>);
10941094+ impl<S: State> sealed::Sealed for SetFailed<S> {}
10951095+ impl<S: State> State for SetFailed<S> {
10961096+ type Succeeded = S::Succeeded;
10971097+ type Failed = Set<members::failed>;
10981098 }
10991099 /// Marker types for field names
11001100 #[allow(non_camel_case_types)]
11011101 pub mod members {
11021102- ///Marker type for the `failed` field
11031103- pub struct failed(());
11041102 ///Marker type for the `succeeded` field
11051103 pub struct succeeded(());
11041104+ ///Marker type for the `failed` field
11051105+ pub struct failed(());
11061106 }
11071107}
11081108···11881188impl<'a, S> ScheduledActionResultsBuilder<'a, S>
11891189where
11901190 S: scheduled_action_results_state::State,
11911191- S::Failed: scheduled_action_results_state::IsSet,
11921191 S::Succeeded: scheduled_action_results_state::IsSet,
11921192+ S::Failed: scheduled_action_results_state::IsSet,
11931193{
11941194 /// Build the final struct
11951195 pub fn build(self) -> ScheduledActionResults<'a> {
+140-140
crates/weaver-api/src/tools_ozone/safelink.rs
···144144 }
145145 /// State trait tracking which required fields have been set
146146 pub trait State: sealed::Sealed {
147147- type CreatedBy;
147147+ type Pattern;
148148+ type Url;
148149 type Action;
149149- type Id;
150150 type CreatedAt;
151151+ type Id;
151152 type EventType;
152152- type Url;
153153+ type CreatedBy;
153154 type Reason;
154154- type Pattern;
155155 }
156156 /// Empty state - all required fields are unset
157157 pub struct Empty(());
158158 impl sealed::Sealed for Empty {}
159159 impl State for Empty {
160160- type CreatedBy = Unset;
160160+ type Pattern = Unset;
161161+ type Url = Unset;
161162 type Action = Unset;
163163+ type CreatedAt = Unset;
162164 type Id = Unset;
163163- type CreatedAt = Unset;
164165 type EventType = Unset;
165165- type Url = Unset;
166166+ type CreatedBy = Unset;
166167 type Reason = Unset;
167167- type Pattern = Unset;
168168 }
169169- ///State transition - sets the `created_by` field to Set
170170- pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
171171- impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
172172- impl<S: State> State for SetCreatedBy<S> {
173173- type CreatedBy = Set<members::created_by>;
169169+ ///State transition - sets the `pattern` field to Set
170170+ pub struct SetPattern<S: State = Empty>(PhantomData<fn() -> S>);
171171+ impl<S: State> sealed::Sealed for SetPattern<S> {}
172172+ impl<S: State> State for SetPattern<S> {
173173+ type Pattern = Set<members::pattern>;
174174+ type Url = S::Url;
174175 type Action = S::Action;
176176+ type CreatedAt = S::CreatedAt;
175177 type Id = S::Id;
178178+ type EventType = S::EventType;
179179+ type CreatedBy = S::CreatedBy;
180180+ type Reason = S::Reason;
181181+ }
182182+ ///State transition - sets the `url` field to Set
183183+ pub struct SetUrl<S: State = Empty>(PhantomData<fn() -> S>);
184184+ impl<S: State> sealed::Sealed for SetUrl<S> {}
185185+ impl<S: State> State for SetUrl<S> {
186186+ type Pattern = S::Pattern;
187187+ type Url = Set<members::url>;
188188+ type Action = S::Action;
176189 type CreatedAt = S::CreatedAt;
190190+ type Id = S::Id;
177191 type EventType = S::EventType;
178178- type Url = S::Url;
192192+ type CreatedBy = S::CreatedBy;
179193 type Reason = S::Reason;
180180- type Pattern = S::Pattern;
181194 }
182195 ///State transition - sets the `action` field to Set
183196 pub struct SetAction<S: State = Empty>(PhantomData<fn() -> S>);
184197 impl<S: State> sealed::Sealed for SetAction<S> {}
185198 impl<S: State> State for SetAction<S> {
186186- type CreatedBy = S::CreatedBy;
199199+ type Pattern = S::Pattern;
200200+ type Url = S::Url;
187201 type Action = Set<members::action>;
202202+ type CreatedAt = S::CreatedAt;
188203 type Id = S::Id;
189189- type CreatedAt = S::CreatedAt;
190204 type EventType = S::EventType;
191191- type Url = S::Url;
192192- type Reason = S::Reason;
193193- type Pattern = S::Pattern;
194194- }
195195- ///State transition - sets the `id` field to Set
196196- pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
197197- impl<S: State> sealed::Sealed for SetId<S> {}
198198- impl<S: State> State for SetId<S> {
199205 type CreatedBy = S::CreatedBy;
200200- type Action = S::Action;
201201- type Id = Set<members::id>;
202202- type CreatedAt = S::CreatedAt;
203203- type EventType = S::EventType;
204204- type Url = S::Url;
205206 type Reason = S::Reason;
206206- type Pattern = S::Pattern;
207207 }
208208 ///State transition - sets the `created_at` field to Set
209209 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
210210 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
211211 impl<S: State> State for SetCreatedAt<S> {
212212- type CreatedBy = S::CreatedBy;
212212+ type Pattern = S::Pattern;
213213+ type Url = S::Url;
213214 type Action = S::Action;
214214- type Id = S::Id;
215215 type CreatedAt = Set<members::created_at>;
216216+ type Id = S::Id;
216217 type EventType = S::EventType;
217217- type Url = S::Url;
218218+ type CreatedBy = S::CreatedBy;
218219 type Reason = S::Reason;
220220+ }
221221+ ///State transition - sets the `id` field to Set
222222+ pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
223223+ impl<S: State> sealed::Sealed for SetId<S> {}
224224+ impl<S: State> State for SetId<S> {
219225 type Pattern = S::Pattern;
226226+ type Url = S::Url;
227227+ type Action = S::Action;
228228+ type CreatedAt = S::CreatedAt;
229229+ type Id = Set<members::id>;
230230+ type EventType = S::EventType;
231231+ type CreatedBy = S::CreatedBy;
232232+ type Reason = S::Reason;
220233 }
221234 ///State transition - sets the `event_type` field to Set
222235 pub struct SetEventType<S: State = Empty>(PhantomData<fn() -> S>);
223236 impl<S: State> sealed::Sealed for SetEventType<S> {}
224237 impl<S: State> State for SetEventType<S> {
225225- type CreatedBy = S::CreatedBy;
238238+ type Pattern = S::Pattern;
239239+ type Url = S::Url;
226240 type Action = S::Action;
241241+ type CreatedAt = S::CreatedAt;
227242 type Id = S::Id;
228228- type CreatedAt = S::CreatedAt;
229243 type EventType = Set<members::event_type>;
230230- type Url = S::Url;
244244+ type CreatedBy = S::CreatedBy;
231245 type Reason = S::Reason;
232232- type Pattern = S::Pattern;
233246 }
234234- ///State transition - sets the `url` field to Set
235235- pub struct SetUrl<S: State = Empty>(PhantomData<fn() -> S>);
236236- impl<S: State> sealed::Sealed for SetUrl<S> {}
237237- impl<S: State> State for SetUrl<S> {
238238- type CreatedBy = S::CreatedBy;
247247+ ///State transition - sets the `created_by` field to Set
248248+ pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
249249+ impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
250250+ impl<S: State> State for SetCreatedBy<S> {
251251+ type Pattern = S::Pattern;
252252+ type Url = S::Url;
239253 type Action = S::Action;
254254+ type CreatedAt = S::CreatedAt;
240255 type Id = S::Id;
241241- type CreatedAt = S::CreatedAt;
242256 type EventType = S::EventType;
243243- type Url = Set<members::url>;
257257+ type CreatedBy = Set<members::created_by>;
244258 type Reason = S::Reason;
245245- type Pattern = S::Pattern;
246259 }
247260 ///State transition - sets the `reason` field to Set
248261 pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
249262 impl<S: State> sealed::Sealed for SetReason<S> {}
250263 impl<S: State> State for SetReason<S> {
251251- type CreatedBy = S::CreatedBy;
264264+ type Pattern = S::Pattern;
265265+ type Url = S::Url;
252266 type Action = S::Action;
267267+ type CreatedAt = S::CreatedAt;
253268 type Id = S::Id;
254254- type CreatedAt = S::CreatedAt;
255269 type EventType = S::EventType;
256256- type Url = S::Url;
270270+ type CreatedBy = S::CreatedBy;
257271 type Reason = Set<members::reason>;
258258- type Pattern = S::Pattern;
259259- }
260260- ///State transition - sets the `pattern` field to Set
261261- pub struct SetPattern<S: State = Empty>(PhantomData<fn() -> S>);
262262- impl<S: State> sealed::Sealed for SetPattern<S> {}
263263- impl<S: State> State for SetPattern<S> {
264264- type CreatedBy = S::CreatedBy;
265265- type Action = S::Action;
266266- type Id = S::Id;
267267- type CreatedAt = S::CreatedAt;
268268- type EventType = S::EventType;
269269- type Url = S::Url;
270270- type Reason = S::Reason;
271271- type Pattern = Set<members::pattern>;
272272 }
273273 /// Marker types for field names
274274 #[allow(non_camel_case_types)]
275275 pub mod members {
276276- ///Marker type for the `created_by` field
277277- pub struct created_by(());
276276+ ///Marker type for the `pattern` field
277277+ pub struct pattern(());
278278+ ///Marker type for the `url` field
279279+ pub struct url(());
278280 ///Marker type for the `action` field
279281 pub struct action(());
282282+ ///Marker type for the `created_at` field
283283+ pub struct created_at(());
280284 ///Marker type for the `id` field
281285 pub struct id(());
282282- ///Marker type for the `created_at` field
283283- pub struct created_at(());
284286 ///Marker type for the `event_type` field
285287 pub struct event_type(());
286286- ///Marker type for the `url` field
287287- pub struct url(());
288288+ ///Marker type for the `created_by` field
289289+ pub struct created_by(());
288290 ///Marker type for the `reason` field
289291 pub struct reason(());
290290- ///Marker type for the `pattern` field
291291- pub struct pattern(());
292292 }
293293}
294294···508508impl<'a, S> EventBuilder<'a, S>
509509where
510510 S: event_state::State,
511511- S::CreatedBy: event_state::IsSet,
511511+ S::Pattern: event_state::IsSet,
512512+ S::Url: event_state::IsSet,
512513 S::Action: event_state::IsSet,
513513- S::Id: event_state::IsSet,
514514 S::CreatedAt: event_state::IsSet,
515515+ S::Id: event_state::IsSet,
515516 S::EventType: event_state::IsSet,
516516- S::Url: event_state::IsSet,
517517+ S::CreatedBy: event_state::IsSet,
517518 S::Reason: event_state::IsSet,
518518- S::Pattern: event_state::IsSet,
519519{
520520 /// Build the final struct
521521 pub fn build(self) -> Event<'a> {
···12571257 }
12581258 /// State trait tracking which required fields have been set
12591259 pub trait State: sealed::Sealed {
12601260- type Reason;
12611261- type CreatedBy;
12621262- type UpdatedAt;
12631260 type CreatedAt;
12611261+ type UpdatedAt;
12641262 type Url;
12651265- type Action;
12661263 type Pattern;
12641264+ type Reason;
12651265+ type Action;
12661266+ type CreatedBy;
12671267 }
12681268 /// Empty state - all required fields are unset
12691269 pub struct Empty(());
12701270 impl sealed::Sealed for Empty {}
12711271 impl State for Empty {
12721272- type Reason = Unset;
12731273- type CreatedBy = Unset;
12741274- type UpdatedAt = Unset;
12751272 type CreatedAt = Unset;
12731273+ type UpdatedAt = Unset;
12761274 type Url = Unset;
12771277- type Action = Unset;
12781275 type Pattern = Unset;
12761276+ type Reason = Unset;
12771277+ type Action = Unset;
12781278+ type CreatedBy = Unset;
12791279 }
12801280- ///State transition - sets the `reason` field to Set
12811281- pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
12821282- impl<S: State> sealed::Sealed for SetReason<S> {}
12831283- impl<S: State> State for SetReason<S> {
12841284- type Reason = Set<members::reason>;
12851285- type CreatedBy = S::CreatedBy;
12801280+ ///State transition - sets the `created_at` field to Set
12811281+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
12821282+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
12831283+ impl<S: State> State for SetCreatedAt<S> {
12841284+ type CreatedAt = Set<members::created_at>;
12861285 type UpdatedAt = S::UpdatedAt;
12871287- type CreatedAt = S::CreatedAt;
12881286 type Url = S::Url;
12891289- type Action = S::Action;
12901287 type Pattern = S::Pattern;
12911291- }
12921292- ///State transition - sets the `created_by` field to Set
12931293- pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
12941294- impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
12951295- impl<S: State> State for SetCreatedBy<S> {
12961288 type Reason = S::Reason;
12971297- type CreatedBy = Set<members::created_by>;
12981298- type UpdatedAt = S::UpdatedAt;
12991299- type CreatedAt = S::CreatedAt;
13001300- type Url = S::Url;
13011289 type Action = S::Action;
13021302- type Pattern = S::Pattern;
12901290+ type CreatedBy = S::CreatedBy;
13031291 }
13041292 ///State transition - sets the `updated_at` field to Set
13051293 pub struct SetUpdatedAt<S: State = Empty>(PhantomData<fn() -> S>);
13061294 impl<S: State> sealed::Sealed for SetUpdatedAt<S> {}
13071295 impl<S: State> State for SetUpdatedAt<S> {
13081308- type Reason = S::Reason;
13091309- type CreatedBy = S::CreatedBy;
12961296+ type CreatedAt = S::CreatedAt;
13101297 type UpdatedAt = Set<members::updated_at>;
13111311- type CreatedAt = S::CreatedAt;
13121298 type Url = S::Url;
13131313- type Action = S::Action;
13141299 type Pattern = S::Pattern;
13151315- }
13161316- ///State transition - sets the `created_at` field to Set
13171317- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
13181318- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
13191319- impl<S: State> State for SetCreatedAt<S> {
13201300 type Reason = S::Reason;
13011301+ type Action = S::Action;
13211302 type CreatedBy = S::CreatedBy;
13221322- type UpdatedAt = S::UpdatedAt;
13231323- type CreatedAt = Set<members::created_at>;
13241324- type Url = S::Url;
13251325- type Action = S::Action;
13261326- type Pattern = S::Pattern;
13271303 }
13281304 ///State transition - sets the `url` field to Set
13291305 pub struct SetUrl<S: State = Empty>(PhantomData<fn() -> S>);
13301306 impl<S: State> sealed::Sealed for SetUrl<S> {}
13311307 impl<S: State> State for SetUrl<S> {
13081308+ type CreatedAt = S::CreatedAt;
13091309+ type UpdatedAt = S::UpdatedAt;
13101310+ type Url = Set<members::url>;
13111311+ type Pattern = S::Pattern;
13321312 type Reason = S::Reason;
13131313+ type Action = S::Action;
13331314 type CreatedBy = S::CreatedBy;
13151315+ }
13161316+ ///State transition - sets the `pattern` field to Set
13171317+ pub struct SetPattern<S: State = Empty>(PhantomData<fn() -> S>);
13181318+ impl<S: State> sealed::Sealed for SetPattern<S> {}
13191319+ impl<S: State> State for SetPattern<S> {
13201320+ type CreatedAt = S::CreatedAt;
13341321 type UpdatedAt = S::UpdatedAt;
13221322+ type Url = S::Url;
13231323+ type Pattern = Set<members::pattern>;
13241324+ type Reason = S::Reason;
13251325+ type Action = S::Action;
13261326+ type CreatedBy = S::CreatedBy;
13271327+ }
13281328+ ///State transition - sets the `reason` field to Set
13291329+ pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
13301330+ impl<S: State> sealed::Sealed for SetReason<S> {}
13311331+ impl<S: State> State for SetReason<S> {
13351332 type CreatedAt = S::CreatedAt;
13361336- type Url = Set<members::url>;
13371337- type Action = S::Action;
13331333+ type UpdatedAt = S::UpdatedAt;
13341334+ type Url = S::Url;
13381335 type Pattern = S::Pattern;
13361336+ type Reason = Set<members::reason>;
13371337+ type Action = S::Action;
13381338+ type CreatedBy = S::CreatedBy;
13391339 }
13401340 ///State transition - sets the `action` field to Set
13411341 pub struct SetAction<S: State = Empty>(PhantomData<fn() -> S>);
13421342 impl<S: State> sealed::Sealed for SetAction<S> {}
13431343 impl<S: State> State for SetAction<S> {
13441344- type Reason = S::Reason;
13451345- type CreatedBy = S::CreatedBy;
13441344+ type CreatedAt = S::CreatedAt;
13461345 type UpdatedAt = S::UpdatedAt;
13471347- type CreatedAt = S::CreatedAt;
13481346 type Url = S::Url;
13491349- type Action = Set<members::action>;
13501347 type Pattern = S::Pattern;
13511351- }
13521352- ///State transition - sets the `pattern` field to Set
13531353- pub struct SetPattern<S: State = Empty>(PhantomData<fn() -> S>);
13541354- impl<S: State> sealed::Sealed for SetPattern<S> {}
13551355- impl<S: State> State for SetPattern<S> {
13561348 type Reason = S::Reason;
13491349+ type Action = Set<members::action>;
13571350 type CreatedBy = S::CreatedBy;
13581358- type UpdatedAt = S::UpdatedAt;
13511351+ }
13521352+ ///State transition - sets the `created_by` field to Set
13531353+ pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
13541354+ impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
13551355+ impl<S: State> State for SetCreatedBy<S> {
13591356 type CreatedAt = S::CreatedAt;
13571357+ type UpdatedAt = S::UpdatedAt;
13601358 type Url = S::Url;
13591359+ type Pattern = S::Pattern;
13601360+ type Reason = S::Reason;
13611361 type Action = S::Action;
13621362- type Pattern = Set<members::pattern>;
13621362+ type CreatedBy = Set<members::created_by>;
13631363 }
13641364 /// Marker types for field names
13651365 #[allow(non_camel_case_types)]
13661366 pub mod members {
13671367- ///Marker type for the `reason` field
13681368- pub struct reason(());
13691369- ///Marker type for the `created_by` field
13701370- pub struct created_by(());
13711371- ///Marker type for the `updated_at` field
13721372- pub struct updated_at(());
13731367 ///Marker type for the `created_at` field
13741368 pub struct created_at(());
13691369+ ///Marker type for the `updated_at` field
13701370+ pub struct updated_at(());
13751371 ///Marker type for the `url` field
13761372 pub struct url(());
13731373+ ///Marker type for the `pattern` field
13741374+ pub struct pattern(());
13751375+ ///Marker type for the `reason` field
13761376+ pub struct reason(());
13771377 ///Marker type for the `action` field
13781378 pub struct action(());
13791379- ///Marker type for the `pattern` field
13801380- pub struct pattern(());
13791379+ ///Marker type for the `created_by` field
13801380+ pub struct created_by(());
13811381 }
13821382}
13831383···15671567impl<'a, S> UrlRuleBuilder<'a, S>
15681568where
15691569 S: url_rule_state::State,
15701570- S::Reason: url_rule_state::IsSet,
15711571- S::CreatedBy: url_rule_state::IsSet,
15721572- S::UpdatedAt: url_rule_state::IsSet,
15731570 S::CreatedAt: url_rule_state::IsSet,
15711571+ S::UpdatedAt: url_rule_state::IsSet,
15741572 S::Url: url_rule_state::IsSet,
15751575- S::Action: url_rule_state::IsSet,
15761573 S::Pattern: url_rule_state::IsSet,
15741574+ S::Reason: url_rule_state::IsSet,
15751575+ S::Action: url_rule_state::IsSet,
15761576+ S::CreatedBy: url_rule_state::IsSet,
15771577{
15781578 /// Build the final struct
15791579 pub fn build(self) -> UrlRule<'a> {
···4646 }
4747 /// State trait tracking which required fields have been set
4848 pub trait State: sealed::Sealed {
4949- type Reason;
5049 type Url;
5150 type Action;
5151+ type Reason;
5252 type Pattern;
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 Reason = Unset;
5958 type Url = Unset;
6059 type Action = Unset;
6060+ type Reason = Unset;
6161 type Pattern = Unset;
6262 }
6363- ///State transition - sets the `reason` field to Set
6464- pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
6565- impl<S: State> sealed::Sealed for SetReason<S> {}
6666- impl<S: State> State for SetReason<S> {
6767- type Reason = Set<members::reason>;
6868- type Url = S::Url;
6969- type Action = S::Action;
7070- type Pattern = S::Pattern;
7171- }
7263 ///State transition - sets the `url` field to Set
7364 pub struct SetUrl<S: State = Empty>(PhantomData<fn() -> S>);
7465 impl<S: State> sealed::Sealed for SetUrl<S> {}
7566 impl<S: State> State for SetUrl<S> {
7676- type Reason = S::Reason;
7767 type Url = Set<members::url>;
7868 type Action = S::Action;
6969+ type Reason = S::Reason;
7970 type Pattern = S::Pattern;
8071 }
8172 ///State transition - sets the `action` field to Set
8273 pub struct SetAction<S: State = Empty>(PhantomData<fn() -> S>);
8374 impl<S: State> sealed::Sealed for SetAction<S> {}
8475 impl<S: State> State for SetAction<S> {
8585- type Reason = S::Reason;
8676 type Url = S::Url;
8777 type Action = Set<members::action>;
7878+ type Reason = S::Reason;
7979+ type Pattern = S::Pattern;
8080+ }
8181+ ///State transition - sets the `reason` field to Set
8282+ pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
8383+ impl<S: State> sealed::Sealed for SetReason<S> {}
8484+ impl<S: State> State for SetReason<S> {
8585+ type Url = S::Url;
8686+ type Action = S::Action;
8787+ type Reason = Set<members::reason>;
8888 type Pattern = S::Pattern;
8989 }
9090 ///State transition - sets the `pattern` field to Set
9191 pub struct SetPattern<S: State = Empty>(PhantomData<fn() -> S>);
9292 impl<S: State> sealed::Sealed for SetPattern<S> {}
9393 impl<S: State> State for SetPattern<S> {
9494- type Reason = S::Reason;
9594 type Url = S::Url;
9695 type Action = S::Action;
9696+ type Reason = S::Reason;
9797 type Pattern = Set<members::pattern>;
9898 }
9999 /// Marker types for field names
100100 #[allow(non_camel_case_types)]
101101 pub mod members {
102102- ///Marker type for the `reason` field
103103- pub struct reason(());
104102 ///Marker type for the `url` field
105103 pub struct url(());
106104 ///Marker type for the `action` field
107105 pub struct action(());
106106+ ///Marker type for the `reason` field
107107+ pub struct reason(());
108108 ///Marker type for the `pattern` field
109109 pub struct pattern(());
110110 }
···256256impl<'a, S> AddRuleBuilder<'a, S>
257257where
258258 S: add_rule_state::State,
259259- S::Reason: add_rule_state::IsSet,
260259 S::Url: add_rule_state::IsSet,
261260 S::Action: add_rule_state::IsSet,
261261+ S::Reason: add_rule_state::IsSet,
262262 S::Pattern: add_rule_state::IsSet,
263263{
264264 /// Build the final struct
···4242 }
4343 /// State trait tracking which required fields have been set
4444 pub trait State: sealed::Sealed {
4545- type Pattern;
4645 type Url;
4646+ type Pattern;
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 Pattern = Unset;
5352 type Url = Unset;
5454- }
5555- ///State transition - sets the `pattern` field to Set
5656- pub struct SetPattern<S: State = Empty>(PhantomData<fn() -> S>);
5757- impl<S: State> sealed::Sealed for SetPattern<S> {}
5858- impl<S: State> State for SetPattern<S> {
5959- type Pattern = Set<members::pattern>;
6060- type Url = S::Url;
5353+ type Pattern = Unset;
6154 }
6255 ///State transition - sets the `url` field to Set
6356 pub struct SetUrl<S: State = Empty>(PhantomData<fn() -> S>);
6457 impl<S: State> sealed::Sealed for SetUrl<S> {}
6558 impl<S: State> State for SetUrl<S> {
6666- type Pattern = S::Pattern;
6759 type Url = Set<members::url>;
6060+ type Pattern = S::Pattern;
6161+ }
6262+ ///State transition - sets the `pattern` field to Set
6363+ pub struct SetPattern<S: State = Empty>(PhantomData<fn() -> S>);
6464+ impl<S: State> sealed::Sealed for SetPattern<S> {}
6565+ impl<S: State> State for SetPattern<S> {
6666+ type Url = S::Url;
6767+ type Pattern = Set<members::pattern>;
6868 }
6969 /// Marker types for field names
7070 #[allow(non_camel_case_types)]
7171 pub mod members {
7272- ///Marker type for the `pattern` field
7373- pub struct pattern(());
7472 ///Marker type for the `url` field
7573 pub struct url(());
7474+ ///Marker type for the `pattern` field
7575+ pub struct pattern(());
7676 }
7777}
7878···182182impl<'a, S> RemoveRuleBuilder<'a, S>
183183where
184184 S: remove_rule_state::State,
185185- S::Pattern: remove_rule_state::IsSet,
186185 S::Url: remove_rule_state::IsSet,
186186+ S::Pattern: remove_rule_state::IsSet,
187187{
188188 /// Build the final struct
189189 pub fn build(self) -> RemoveRule<'a> {
···4747 /// State trait tracking which required fields have been set
4848 pub trait State: sealed::Sealed {
4949 type Action;
5050- type Pattern;
5151- type Url;
5250 type Reason;
5151+ type Url;
5252+ type Pattern;
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 Action = Unset;
5959- type Pattern = Unset;
6060- type Url = Unset;
6159 type Reason = Unset;
6060+ type Url = Unset;
6161+ type Pattern = Unset;
6262 }
6363 ///State transition - sets the `action` field to Set
6464 pub struct SetAction<S: State = Empty>(PhantomData<fn() -> S>);
6565 impl<S: State> sealed::Sealed for SetAction<S> {}
6666 impl<S: State> State for SetAction<S> {
6767 type Action = Set<members::action>;
6868- type Pattern = S::Pattern;
6969- type Url = S::Url;
7068 type Reason = S::Reason;
6969+ type Url = S::Url;
7070+ type Pattern = S::Pattern;
7171 }
7272- ///State transition - sets the `pattern` field to Set
7373- pub struct SetPattern<S: State = Empty>(PhantomData<fn() -> S>);
7474- impl<S: State> sealed::Sealed for SetPattern<S> {}
7575- impl<S: State> State for SetPattern<S> {
7272+ ///State transition - sets the `reason` field to Set
7373+ pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
7474+ impl<S: State> sealed::Sealed for SetReason<S> {}
7575+ impl<S: State> State for SetReason<S> {
7676 type Action = S::Action;
7777- type Pattern = Set<members::pattern>;
7777+ type Reason = Set<members::reason>;
7878 type Url = S::Url;
7979- type Reason = S::Reason;
7979+ type Pattern = S::Pattern;
8080 }
8181 ///State transition - sets the `url` field to Set
8282 pub struct SetUrl<S: State = Empty>(PhantomData<fn() -> S>);
8383 impl<S: State> sealed::Sealed for SetUrl<S> {}
8484 impl<S: State> State for SetUrl<S> {
8585 type Action = S::Action;
8686- type Pattern = S::Pattern;
8686+ type Reason = S::Reason;
8787 type Url = Set<members::url>;
8888- type Reason = S::Reason;
8888+ type Pattern = S::Pattern;
8989 }
9090- ///State transition - sets the `reason` field to Set
9191- pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
9292- impl<S: State> sealed::Sealed for SetReason<S> {}
9393- impl<S: State> State for SetReason<S> {
9090+ ///State transition - sets the `pattern` field to Set
9191+ pub struct SetPattern<S: State = Empty>(PhantomData<fn() -> S>);
9292+ impl<S: State> sealed::Sealed for SetPattern<S> {}
9393+ impl<S: State> State for SetPattern<S> {
9494 type Action = S::Action;
9595- type Pattern = S::Pattern;
9595+ type Reason = S::Reason;
9696 type Url = S::Url;
9797- type Reason = Set<members::reason>;
9797+ type Pattern = Set<members::pattern>;
9898 }
9999 /// Marker types for field names
100100 #[allow(non_camel_case_types)]
101101 pub mod members {
102102 ///Marker type for the `action` field
103103 pub struct action(());
104104- ///Marker type for the `pattern` field
105105- pub struct pattern(());
106106- ///Marker type for the `url` field
107107- pub struct url(());
108104 ///Marker type for the `reason` field
109105 pub struct reason(());
106106+ ///Marker type for the `url` field
107107+ pub struct url(());
108108+ ///Marker type for the `pattern` field
109109+ pub struct pattern(());
110110 }
111111}
112112···257257where
258258 S: update_rule_state::State,
259259 S::Action: update_rule_state::IsSet,
260260- S::Pattern: update_rule_state::IsSet,
261261- S::Url: update_rule_state::IsSet,
262260 S::Reason: update_rule_state::IsSet,
261261+ S::Url: update_rule_state::IsSet,
262262+ S::Pattern: update_rule_state::IsSet,
263263{
264264 /// Build the final struct
265265 pub fn build(self) -> UpdateRule<'a> {
+26-26
crates/weaver-api/src/tools_ozone/set.rs
···301301 /// State trait tracking which required fields have been set
302302 pub trait State: sealed::Sealed {
303303 type Name;
304304- type SetSize;
305305- type CreatedAt;
306304 type UpdatedAt;
305305+ type CreatedAt;
306306+ type SetSize;
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;
313313- type SetSize = Unset;
314314- type CreatedAt = Unset;
315313 type UpdatedAt = Unset;
314314+ type CreatedAt = Unset;
315315+ type SetSize = 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;
324322 type UpdatedAt = S::UpdatedAt;
323323+ type CreatedAt = S::CreatedAt;
324324+ type SetSize = S::SetSize;
325325 }
326326- ///State transition - sets the `set_size` field to Set
327327- pub struct SetSetSize<S: State = Empty>(PhantomData<fn() -> S>);
328328- impl<S: State> sealed::Sealed for SetSetSize<S> {}
329329- impl<S: State> State for SetSetSize<S> {
326326+ ///State transition - sets the `updated_at` field to Set
327327+ pub struct SetUpdatedAt<S: State = Empty>(PhantomData<fn() -> S>);
328328+ impl<S: State> sealed::Sealed for SetUpdatedAt<S> {}
329329+ impl<S: State> State for SetUpdatedAt<S> {
330330 type Name = S::Name;
331331- type SetSize = Set<members::set_size>;
331331+ type UpdatedAt = Set<members::updated_at>;
332332 type CreatedAt = S::CreatedAt;
333333- type UpdatedAt = S::UpdatedAt;
333333+ type SetSize = S::SetSize;
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> {
339339 type Name = S::Name;
340340- type SetSize = S::SetSize;
340340+ type UpdatedAt = S::UpdatedAt;
341341 type CreatedAt = Set<members::created_at>;
342342- type UpdatedAt = S::UpdatedAt;
342342+ type SetSize = S::SetSize;
343343 }
344344- ///State transition - sets the `updated_at` field to Set
345345- pub struct SetUpdatedAt<S: State = Empty>(PhantomData<fn() -> S>);
346346- impl<S: State> sealed::Sealed for SetUpdatedAt<S> {}
347347- impl<S: State> State for SetUpdatedAt<S> {
344344+ ///State transition - sets the `set_size` field to Set
345345+ pub struct SetSetSize<S: State = Empty>(PhantomData<fn() -> S>);
346346+ impl<S: State> sealed::Sealed for SetSetSize<S> {}
347347+ impl<S: State> State for SetSetSize<S> {
348348 type Name = S::Name;
349349- type SetSize = S::SetSize;
349349+ type UpdatedAt = S::UpdatedAt;
350350 type CreatedAt = S::CreatedAt;
351351- type UpdatedAt = Set<members::updated_at>;
351351+ type SetSize = Set<members::set_size>;
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(());
358358- ///Marker type for the `set_size` field
359359- pub struct set_size(());
360360- ///Marker type for the `created_at` field
361361- pub struct created_at(());
362358 ///Marker type for the `updated_at` field
363359 pub struct updated_at(());
360360+ ///Marker type for the `created_at` field
361361+ pub struct created_at(());
362362+ ///Marker type for the `set_size` field
363363+ pub struct set_size(());
364364 }
365365}
366366···494494where
495495 S: set_view_state::State,
496496 S::Name: set_view_state::IsSet,
497497- S::SetSize: set_view_state::IsSet,
498498- S::CreatedAt: set_view_state::IsSet,
499497 S::UpdatedAt: set_view_state::IsSet,
498498+ S::CreatedAt: set_view_state::IsSet,
499499+ S::SetSize: 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 Values;
3938 type Name;
3939+ type Values;
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 Values = Unset;
4645 type Name = Unset;
4747- }
4848- ///State transition - sets the `values` field to Set
4949- pub struct SetValues<S: State = Empty>(PhantomData<fn() -> S>);
5050- impl<S: State> sealed::Sealed for SetValues<S> {}
5151- impl<S: State> State for SetValues<S> {
5252- type Values = Set<members::values>;
5353- type Name = S::Name;
4646+ type Values = Unset;
5447 }
5548 ///State transition - sets the `name` field to Set
5649 pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
5750 impl<S: State> sealed::Sealed for SetName<S> {}
5851 impl<S: State> State for SetName<S> {
5959- type Values = S::Values;
6052 type Name = Set<members::name>;
5353+ type Values = S::Values;
5454+ }
5555+ ///State transition - sets the `values` field to Set
5656+ pub struct SetValues<S: State = Empty>(PhantomData<fn() -> S>);
5757+ impl<S: State> sealed::Sealed for SetValues<S> {}
5858+ impl<S: State> State for SetValues<S> {
5959+ type Name = S::Name;
6060+ type Values = Set<members::values>;
6161 }
6262 /// Marker types for field names
6363 #[allow(non_camel_case_types)]
6464 pub mod members {
6565- ///Marker type for the `values` field
6666- pub struct values(());
6765 ///Marker type for the `name` field
6866 pub struct name(());
6767+ ///Marker type for the `values` field
6868+ pub struct values(());
6969 }
7070}
7171···138138impl<'a, S> DeleteValuesBuilder<'a, S>
139139where
140140 S: delete_values_state::State,
141141- S::Values: delete_values_state::IsSet,
142141 S::Name: delete_values_state::IsSet,
142142+ S::Values: delete_values_state::IsSet,
143143{
144144 /// Build the final struct
145145 pub fn build(self) -> DeleteValues<'a> {
+48-48
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 LastUpdatedBy;
5959- type Key;
5858+ type Scope;
6059 type Value;
6160 type Did;
6262- type Scope;
6161+ type Key;
6362 type CreatedBy;
6363+ type LastUpdatedBy;
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 LastUpdatedBy = Unset;
7070- type Key = Unset;
6969+ type Scope = Unset;
7170 type Value = Unset;
7271 type Did = Unset;
7373- type Scope = Unset;
7272+ type Key = Unset;
7473 type CreatedBy = Unset;
7474+ type LastUpdatedBy = Unset;
7575 }
7676- ///State transition - sets the `last_updated_by` field to Set
7777- pub struct SetLastUpdatedBy<S: State = Empty>(PhantomData<fn() -> S>);
7878- impl<S: State> sealed::Sealed for SetLastUpdatedBy<S> {}
7979- impl<S: State> State for SetLastUpdatedBy<S> {
8080- type LastUpdatedBy = Set<members::last_updated_by>;
8181- type Key = S::Key;
7676+ ///State transition - sets the `scope` field to Set
7777+ pub struct SetScope<S: State = Empty>(PhantomData<fn() -> S>);
7878+ impl<S: State> sealed::Sealed for SetScope<S> {}
7979+ impl<S: State> State for SetScope<S> {
8080+ type Scope = Set<members::scope>;
8281 type Value = S::Value;
8382 type Did = S::Did;
8484- type Scope = S::Scope;
8383+ type Key = S::Key;
8584 type CreatedBy = S::CreatedBy;
8686- }
8787- ///State transition - sets the `key` field to Set
8888- pub struct SetKey<S: State = Empty>(PhantomData<fn() -> S>);
8989- impl<S: State> sealed::Sealed for SetKey<S> {}
9090- impl<S: State> State for SetKey<S> {
9185 type LastUpdatedBy = S::LastUpdatedBy;
9292- type Key = Set<members::key>;
9393- type Value = S::Value;
9494- type Did = S::Did;
9595- type Scope = S::Scope;
9696- type CreatedBy = S::CreatedBy;
9786 }
9887 ///State transition - sets the `value` field to Set
9988 pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
10089 impl<S: State> sealed::Sealed for SetValue<S> {}
10190 impl<S: State> State for SetValue<S> {
102102- type LastUpdatedBy = S::LastUpdatedBy;
103103- type Key = S::Key;
9191+ type Scope = S::Scope;
10492 type Value = Set<members::value>;
10593 type Did = S::Did;
106106- type Scope = S::Scope;
9494+ type Key = S::Key;
10795 type CreatedBy = S::CreatedBy;
9696+ type LastUpdatedBy = S::LastUpdatedBy;
10897 }
10998 ///State transition - sets the `did` field to Set
11099 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
111100 impl<S: State> sealed::Sealed for SetDid<S> {}
112101 impl<S: State> State for SetDid<S> {
113113- type LastUpdatedBy = S::LastUpdatedBy;
114114- type Key = S::Key;
102102+ type Scope = S::Scope;
115103 type Value = S::Value;
116104 type Did = Set<members::did>;
117117- type Scope = S::Scope;
105105+ type Key = S::Key;
118106 type CreatedBy = S::CreatedBy;
119119- }
120120- ///State transition - sets the `scope` field to Set
121121- pub struct SetScope<S: State = Empty>(PhantomData<fn() -> S>);
122122- impl<S: State> sealed::Sealed for SetScope<S> {}
123123- impl<S: State> State for SetScope<S> {
124107 type LastUpdatedBy = S::LastUpdatedBy;
125125- type Key = S::Key;
108108+ }
109109+ ///State transition - sets the `key` field to Set
110110+ pub struct SetKey<S: State = Empty>(PhantomData<fn() -> S>);
111111+ impl<S: State> sealed::Sealed for SetKey<S> {}
112112+ impl<S: State> State for SetKey<S> {
113113+ type Scope = S::Scope;
126114 type Value = S::Value;
127115 type Did = S::Did;
128128- type Scope = Set<members::scope>;
116116+ type Key = Set<members::key>;
129117 type CreatedBy = S::CreatedBy;
118118+ type LastUpdatedBy = S::LastUpdatedBy;
130119 }
131120 ///State transition - sets the `created_by` field to Set
132121 pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
133122 impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
134123 impl<S: State> State for SetCreatedBy<S> {
124124+ type Scope = S::Scope;
125125+ type Value = S::Value;
126126+ type Did = S::Did;
127127+ type Key = S::Key;
128128+ type CreatedBy = Set<members::created_by>;
135129 type LastUpdatedBy = S::LastUpdatedBy;
136136- type Key = S::Key;
130130+ }
131131+ ///State transition - sets the `last_updated_by` field to Set
132132+ pub struct SetLastUpdatedBy<S: State = Empty>(PhantomData<fn() -> S>);
133133+ impl<S: State> sealed::Sealed for SetLastUpdatedBy<S> {}
134134+ impl<S: State> State for SetLastUpdatedBy<S> {
135135+ type Scope = S::Scope;
137136 type Value = S::Value;
138137 type Did = S::Did;
139139- type Scope = S::Scope;
140140- type CreatedBy = Set<members::created_by>;
138138+ type Key = S::Key;
139139+ type CreatedBy = S::CreatedBy;
140140+ type LastUpdatedBy = Set<members::last_updated_by>;
141141 }
142142 /// Marker types for field names
143143 #[allow(non_camel_case_types)]
144144 pub mod members {
145145- ///Marker type for the `last_updated_by` field
146146- pub struct last_updated_by(());
147147- ///Marker type for the `key` field
148148- pub struct key(());
145145+ ///Marker type for the `scope` field
146146+ pub struct scope(());
149147 ///Marker type for the `value` field
150148 pub struct value(());
151149 ///Marker type for the `did` field
152150 pub struct did(());
153153- ///Marker type for the `scope` field
154154- pub struct scope(());
151151+ ///Marker type for the `key` field
152152+ pub struct key(());
155153 ///Marker type for the `created_by` field
156154 pub struct created_by(());
155155+ ///Marker type for the `last_updated_by` field
156156+ pub struct last_updated_by(());
157157 }
158158}
159159···397397impl<'a, S> DefsOptionBuilder<'a, S>
398398where
399399 S: defs_option_state::State,
400400- S::LastUpdatedBy: defs_option_state::IsSet,
401401- S::Key: defs_option_state::IsSet,
400400+ S::Scope: defs_option_state::IsSet,
402401 S::Value: defs_option_state::IsSet,
403402 S::Did: defs_option_state::IsSet,
404404- S::Scope: defs_option_state::IsSet,
403403+ S::Key: defs_option_state::IsSet,
405404 S::CreatedBy: defs_option_state::IsSet,
405405+ S::LastUpdatedBy: defs_option_state::IsSet,
406406{
407407 /// Build the final struct
408408 pub fn build(self) -> DefsOption<'a> {
···4141 }
4242 /// State trait tracking which required fields have been set
4343 pub trait State: sealed::Sealed {
4444+ type Scope;
4445 type Value;
4546 type Key;
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 Scope = Unset;
5253 type Value = Unset;
5354 type Key = Unset;
5454- type Scope = Unset;
5555+ }
5656+ ///State transition - sets the `scope` field to Set
5757+ pub struct SetScope<S: State = Empty>(PhantomData<fn() -> S>);
5858+ impl<S: State> sealed::Sealed for SetScope<S> {}
5959+ impl<S: State> State for SetScope<S> {
6060+ type Scope = Set<members::scope>;
6161+ type Value = S::Value;
6262+ type Key = S::Key;
5563 }
5664 ///State transition - sets the `value` field to Set
5765 pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
5866 impl<S: State> sealed::Sealed for SetValue<S> {}
5967 impl<S: State> State for SetValue<S> {
6868+ type Scope = S::Scope;
6069 type Value = Set<members::value>;
6170 type Key = S::Key;
6262- type Scope = S::Scope;
6371 }
6472 ///State transition - sets the `key` field to Set
6573 pub struct SetKey<S: State = Empty>(PhantomData<fn() -> S>);
6674 impl<S: State> sealed::Sealed for SetKey<S> {}
6775 impl<S: State> State for SetKey<S> {
6868- type Value = S::Value;
6969- type Key = Set<members::key>;
7076 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> {
7677 type Value = S::Value;
7777- type Key = S::Key;
7878- type Scope = Set<members::scope>;
7878+ type Key = Set<members::key>;
7979 }
8080 /// Marker types for field names
8181 #[allow(non_camel_case_types)]
8282 pub mod members {
8383+ ///Marker type for the `scope` field
8484+ pub struct scope(());
8385 ///Marker type for the `value` field
8486 pub struct value(());
8587 ///Marker type for the `key` field
8688 pub struct key(());
8787- ///Marker type for the `scope` field
8888- pub struct scope(());
8989 }
9090}
9191···218218impl<'a, S> UpsertOptionBuilder<'a, S>
219219where
220220 S: upsert_option_state::State,
221221+ S::Scope: upsert_option_state::IsSet,
221222 S::Value: upsert_option_state::IsSet,
222223 S::Key: upsert_option_state::IsSet,
223223- S::Scope: upsert_option_state::IsSet,
224224{
225225 /// Build the final struct
226226 pub fn build(self) -> UpsertOption<'a> {
···3333 }
3434 /// State trait tracking which required fields have been set
3535 pub trait State: sealed::Sealed {
3636- type Role;
3736 type Did;
3737+ type Role;
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 Role = Unset;
4443 type Did = Unset;
4545- }
4646- ///State transition - sets the `role` field to Set
4747- pub struct SetRole<S: State = Empty>(PhantomData<fn() -> S>);
4848- impl<S: State> sealed::Sealed for SetRole<S> {}
4949- impl<S: State> State for SetRole<S> {
5050- type Role = Set<members::role>;
5151- type Did = S::Did;
4444+ type Role = Unset;
5245 }
5346 ///State transition - sets the `did` field to Set
5447 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
5548 impl<S: State> sealed::Sealed for SetDid<S> {}
5649 impl<S: State> State for SetDid<S> {
5757- type Role = S::Role;
5850 type Did = Set<members::did>;
5151+ type Role = S::Role;
5252+ }
5353+ ///State transition - sets the `role` field to Set
5454+ pub struct SetRole<S: State = Empty>(PhantomData<fn() -> S>);
5555+ impl<S: State> sealed::Sealed for SetRole<S> {}
5656+ impl<S: State> State for SetRole<S> {
5757+ type Did = S::Did;
5858+ type Role = Set<members::role>;
5959 }
6060 /// Marker types for field names
6161 #[allow(non_camel_case_types)]
6262 pub mod members {
6363- ///Marker type for the `role` field
6464- pub struct role(());
6563 ///Marker type for the `did` field
6664 pub struct did(());
6565+ ///Marker type for the `role` field
6666+ pub struct role(());
6767 }
6868}
6969···136136impl<'a, S> AddMemberBuilder<'a, S>
137137where
138138 S: add_member_state::State,
139139- S::Role: add_member_state::IsSet,
140139 S::Did: add_member_state::IsSet,
140140+ S::Role: add_member_state::IsSet,
141141{
142142 /// Build the final struct
143143 pub fn build(self) -> AddMember<'a> {
+38-38
crates/weaver-api/src/tools_ozone/verification.rs
···7575 /// State trait tracking which required fields have been set
7676 pub trait State: sealed::Sealed {
7777 type Issuer;
7878+ type Uri;
7979+ type Handle;
7880 type Subject;
7981 type DisplayName;
8080- type Uri;
8181- type Handle;
8282 type CreatedAt;
8383 }
8484 /// Empty state - all required fields are unset
···8686 impl sealed::Sealed for Empty {}
8787 impl State for Empty {
8888 type Issuer = Unset;
8989+ type Uri = Unset;
9090+ type Handle = Unset;
8991 type Subject = Unset;
9092 type DisplayName = Unset;
9191- type Uri = Unset;
9292- type Handle = Unset;
9393 type CreatedAt = Unset;
9494 }
9595 ///State transition - sets the `issuer` field to Set
···9797 impl<S: State> sealed::Sealed for SetIssuer<S> {}
9898 impl<S: State> State for SetIssuer<S> {
9999 type Issuer = Set<members::issuer>;
100100- type Subject = S::Subject;
101101- type DisplayName = S::DisplayName;
102100 type Uri = S::Uri;
103101 type Handle = S::Handle;
104104- type CreatedAt = S::CreatedAt;
105105- }
106106- ///State transition - sets the `subject` field to Set
107107- pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
108108- impl<S: State> sealed::Sealed for SetSubject<S> {}
109109- impl<S: State> State for SetSubject<S> {
110110- type Issuer = S::Issuer;
111111- type Subject = Set<members::subject>;
112112- type DisplayName = S::DisplayName;
113113- type Uri = S::Uri;
114114- type Handle = S::Handle;
115115- type CreatedAt = S::CreatedAt;
116116- }
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 Issuer = S::Issuer;
122102 type Subject = S::Subject;
123123- type DisplayName = Set<members::display_name>;
124124- type Uri = S::Uri;
125125- type Handle = S::Handle;
103103+ type DisplayName = S::DisplayName;
126104 type CreatedAt = S::CreatedAt;
127105 }
128106 ///State transition - sets the `uri` field to Set
···130108 impl<S: State> sealed::Sealed for SetUri<S> {}
131109 impl<S: State> State for SetUri<S> {
132110 type Issuer = S::Issuer;
111111+ type Uri = Set<members::uri>;
112112+ type Handle = S::Handle;
133113 type Subject = S::Subject;
134114 type DisplayName = S::DisplayName;
135135- type Uri = Set<members::uri>;
136136- type Handle = S::Handle;
137115 type CreatedAt = S::CreatedAt;
138116 }
139117 ///State transition - sets the `handle` field to Set
···141119 impl<S: State> sealed::Sealed for SetHandle<S> {}
142120 impl<S: State> State for SetHandle<S> {
143121 type Issuer = S::Issuer;
122122+ type Uri = S::Uri;
123123+ type Handle = Set<members::handle>;
144124 type Subject = S::Subject;
145125 type DisplayName = S::DisplayName;
126126+ type CreatedAt = S::CreatedAt;
127127+ }
128128+ ///State transition - sets the `subject` field to Set
129129+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
130130+ impl<S: State> sealed::Sealed for SetSubject<S> {}
131131+ impl<S: State> State for SetSubject<S> {
132132+ type Issuer = S::Issuer;
146133 type Uri = S::Uri;
147147- type Handle = Set<members::handle>;
134134+ type Handle = S::Handle;
135135+ type Subject = Set<members::subject>;
136136+ 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> {
143143+ type Issuer = S::Issuer;
144144+ type Uri = S::Uri;
145145+ type Handle = S::Handle;
146146+ type Subject = S::Subject;
147147+ type DisplayName = Set<members::display_name>;
148148 type CreatedAt = S::CreatedAt;
149149 }
150150 ///State transition - sets the `created_at` field to Set
···152152 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
153153 impl<S: State> State for SetCreatedAt<S> {
154154 type Issuer = S::Issuer;
155155- type Subject = S::Subject;
156156- type DisplayName = S::DisplayName;
157155 type Uri = S::Uri;
158156 type Handle = S::Handle;
157157+ type Subject = S::Subject;
158158+ type DisplayName = S::DisplayName;
159159 type CreatedAt = Set<members::created_at>;
160160 }
161161 /// Marker types for field names
···163163 pub mod members {
164164 ///Marker type for the `issuer` field
165165 pub struct issuer(());
166166+ ///Marker type for the `uri` field
167167+ pub struct uri(());
168168+ ///Marker type for the `handle` field
169169+ pub struct handle(());
166170 ///Marker type for the `subject` field
167171 pub struct subject(());
168172 ///Marker type for the `display_name` field
169173 pub struct display_name(());
170170- ///Marker type for the `uri` field
171171- pub struct uri(());
172172- ///Marker type for the `handle` field
173173- pub struct handle(());
174174 ///Marker type for the `created_at` field
175175 pub struct created_at(());
176176 }
···480480where
481481 S: verification_view_state::State,
482482 S::Issuer: verification_view_state::IsSet,
483483+ S::Uri: verification_view_state::IsSet,
484484+ S::Handle: verification_view_state::IsSet,
483485 S::Subject: verification_view_state::IsSet,
484486 S::DisplayName: verification_view_state::IsSet,
485485- S::Uri: verification_view_state::IsSet,
486486- S::Handle: verification_view_state::IsSet,
487487 S::CreatedAt: verification_view_state::IsSet,
488488{
489489 /// Build the final struct
···3636 }
3737 /// State trait tracking which required fields have been set
3838 pub trait State: sealed::Sealed {
3939- type Subject;
4039 type Error;
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 Error = 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 Error = S::Error;
4747+ type Subject = Unset;
5548 }
5649 ///State transition - sets the `error` field to Set
5750 pub struct SetError<S: State = Empty>(PhantomData<fn() -> S>);
5851 impl<S: State> sealed::Sealed for SetError<S> {}
5952 impl<S: State> State for SetError<S> {
6060- type Subject = S::Subject;
6153 type Error = Set<members::error>;
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 Error = S::Error;
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 `error` field
6967 pub struct error(());
6868+ ///Marker type for the `subject` field
6969+ pub struct subject(());
7070 }
7171}
7272···139139impl<'a, S> GrantErrorBuilder<'a, S>
140140where
141141 S: grant_error_state::State,
142142- S::Subject: grant_error_state::IsSet,
143142 S::Error: grant_error_state::IsSet,
143143+ S::Subject: grant_error_state::IsSet,
144144{
145145 /// Build the final struct
146146 pub fn build(self) -> GrantError<'a> {
···640640 }
641641 /// State trait tracking which required fields have been set
642642 pub trait State: sealed::Sealed {
643643- type Handle;
644644- type DisplayName;
645643 type Subject;
644644+ type DisplayName;
645645+ type Handle;
646646 }
647647 /// Empty state - all required fields are unset
648648 pub struct Empty(());
649649 impl sealed::Sealed for Empty {}
650650 impl State for Empty {
651651+ type Subject = Unset;
652652+ type DisplayName = Unset;
651653 type Handle = Unset;
652652- type DisplayName = Unset;
653653- type Subject = Unset;
654654 }
655655- ///State transition - sets the `handle` field to Set
656656- pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
657657- impl<S: State> sealed::Sealed for SetHandle<S> {}
658658- impl<S: State> State for SetHandle<S> {
659659- type Handle = Set<members::handle>;
655655+ ///State transition - sets the `subject` field to Set
656656+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
657657+ impl<S: State> sealed::Sealed for SetSubject<S> {}
658658+ impl<S: State> State for SetSubject<S> {
659659+ type Subject = Set<members::subject>;
660660 type DisplayName = S::DisplayName;
661661- type Subject = S::Subject;
661661+ type Handle = S::Handle;
662662 }
663663 ///State transition - sets the `display_name` field to Set
664664 pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>);
665665 impl<S: State> sealed::Sealed for SetDisplayName<S> {}
666666 impl<S: State> State for SetDisplayName<S> {
667667- type Handle = S::Handle;
668668- type DisplayName = Set<members::display_name>;
669667 type Subject = S::Subject;
668668+ type DisplayName = Set<members::display_name>;
669669+ type Handle = S::Handle;
670670 }
671671- ///State transition - sets the `subject` field to Set
672672- pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
673673- impl<S: State> sealed::Sealed for SetSubject<S> {}
674674- impl<S: State> State for SetSubject<S> {
675675- type Handle = S::Handle;
671671+ ///State transition - sets the `handle` field to Set
672672+ pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
673673+ impl<S: State> sealed::Sealed for SetHandle<S> {}
674674+ impl<S: State> State for SetHandle<S> {
675675+ type Subject = S::Subject;
676676 type DisplayName = S::DisplayName;
677677- type Subject = Set<members::subject>;
677677+ type Handle = Set<members::handle>;
678678 }
679679 /// Marker types for field names
680680 #[allow(non_camel_case_types)]
681681 pub mod members {
682682+ ///Marker type for the `subject` field
683683+ pub struct subject(());
684684+ ///Marker type for the `display_name` field
685685+ pub struct display_name(());
682686 ///Marker type for the `handle` field
683687 pub struct handle(());
684684- ///Marker type for the `display_name` field
685685- pub struct display_name(());
686686- ///Marker type for the `subject` field
687687- pub struct subject(());
688688 }
689689}
690690···797797impl<'a, S> VerificationInputBuilder<'a, S>
798798where
799799 S: verification_input_state::State,
800800- S::Handle: verification_input_state::IsSet,
801801- S::DisplayName: verification_input_state::IsSet,
802800 S::Subject: verification_input_state::IsSet,
801801+ S::DisplayName: verification_input_state::IsSet,
802802+ S::Handle: verification_input_state::IsSet,
803803{
804804 /// Build the final struct
805805 pub fn build(self) -> VerificationInput<'a> {
···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> {
+1-1
crates/weaver-app/Cargo.toml
···2323required-features = ["web"]
24242525[features]
2626-default = ["web", "fullstack-server", "use-index"]
2626+default = ["web", "fullstack-server", "use-index", "pckt"]
2727# Fullstack mode with SSR and server functions
2828fullstack-server = ["dioxus/fullstack"]
2929# Enable pckt/site.standard document rendering
···18511851 use jacquard::prelude::IdentityResolver;
18521852 use weaver_api::site_standard::document::Document as SiteStandardDocument;
18531853 use weaver_api::site_standard::publication::Publication;
18541854- use weaver_renderer::pckt::{PcktRenderContext, render_content_blocks};
18541854+ use weaver_renderer::pckt::{PcktRenderContext, render_document_content};
1855185518561856 let ident = ident();
18571857 let rkey = rkey();
···18861886 };
1887188718881888 // Fetch publication to get base URL
18891889- let publication_url =
18901890- if let Ok(pub_record) = fetcher.fetch_record_slingshot(&doc.publication).await {
18891889+ use jacquard::types::string::Uri;
18901890+ let publication_url = if let Uri::At(site_uri) = &doc.site {
18911891+ if let Ok(pub_record) = fetcher.fetch_record_slingshot(site_uri).await {
18911892 jacquard::from_data::<Publication>(&pub_record.value)
18921893 .ok()
18931894 .map(|p| p.url.as_ref().to_string())
18941895 } else {
18951896 None
18961896- };
18971897+ }
18981898+ } else {
18991899+ // Site is an HTTPS URL, use it directly
19001900+ Some(doc.site.as_str().to_string())
19011901+ };
1897190218981903 // Render HTML
18991904 let rendered_html = {
···19021907 AtIdentifier::Handle(h) => fetcher.resolve_handle(h).await.ok()?.into_static(),
19031908 };
19041909 let ctx = PcktRenderContext::new(author_did);
19051905- if let Some(blocks) = &doc.content {
19061906- Some(render_content_blocks(blocks, &ctx, &fetcher).await)
19101910+ if let Some(content) = &doc.content {
19111911+ Some(render_document_content(content, &ctx, &fetcher).await)
19071912 } else {
19081913 Some(String::from("<p>No content</p>"))
19091914 }
···19561961 use jacquard::prelude::IdentityResolver;
19571962 use weaver_api::site_standard::document::Document as SiteStandardDocument;
19581963 use weaver_api::site_standard::publication::Publication;
19591959- use weaver_renderer::pckt::{PcktRenderContext, render_content_blocks};
19641964+ use weaver_renderer::pckt::{PcktRenderContext, render_document_content};
1960196519611966 let fetcher = use_context::<crate::fetch::Fetcher>();
19621967···19962001 };
1997200219982003 // Fetch publication to get base URL
19991999- let publication_url =
20002000- if let Ok(pub_record) = fetcher.fetch_record_slingshot(&doc.publication).await {
20042004+ use jacquard::types::string::Uri;
20052005+ let publication_url = if let Uri::At(site_uri) = &doc.site {
20062006+ if let Ok(pub_record) = fetcher.fetch_record_slingshot(site_uri).await {
20012007 jacquard::from_data::<Publication>(&pub_record.value)
20022008 .ok()
20032009 .map(|p| p.url.as_ref().to_string())
20042010 } else {
20052011 None
20062006- };
20122012+ }
20132013+ } else {
20142014+ // Site is an HTTPS URL, use it directly
20152015+ Some(doc.site.as_str().to_string())
20162016+ };
2007201720082018 // Render HTML
20092019 let rendered_html = {
···20122022 AtIdentifier::Handle(h) => fetcher.resolve_handle(h).await.ok()?.into_static(),
20132023 };
20142024 let ctx = PcktRenderContext::new(author_did);
20152015- if let Some(blocks) = &doc.content {
20162016- Some(render_content_blocks(blocks, &ctx, &fetcher).await)
20252025+ if let Some(content) = &doc.content {
20262026+ Some(render_document_content(content, &ctx, &fetcher).await)
20172027 } else {
20182028 Some(String::from("<p>No content</p>"))
20192029 }
···20612071 cache.insert_bytes(cid, body, cache_key);
20622072 Ok(())
20632073}
20742074+20752075+// ============================================================================
20762076+// Custom Domain Document Resolution
20772077+// ============================================================================
20782078+20792079+use weaver_api::sh_weaver::domain::DocumentView;
20802080+20812081+/// Typed data returned from custom domain document resolution.
20822082+#[derive(Clone, Debug, PartialEq)]
20832083+pub struct CustomDomainDocumentData {
20842084+ pub document: DocumentView<'static>,
20852085+ pub rendered_html: String,
20862086+}
20872087+20882088+#[cfg(feature = "fullstack-server")]
20892089+pub fn use_custom_domain_document_data(
20902090+ ident: ReadSignal<AtIdentifier<'static>>,
20912091+ publication_rkey: ReadSignal<SmolStr>,
20922092+ path: ReadSignal<String>,
20932093+) -> (
20942094+ Result<Resource<Option<(serde_json::Value, String)>>, RenderError>,
20952095+ Memo<Option<CustomDomainDocumentData>>,
20962096+) {
20972097+ let fetcher = use_context::<crate::fetch::Fetcher>();
20982098+ let fetcher = fetcher.clone();
20992099+21002100+ let res = use_server_future(use_reactive!(|(ident, publication_rkey, path)| {
21012101+ let fetcher = fetcher.clone();
21022102+ async move {
21032103+ use jacquard::prelude::XrpcClient;
21042104+ use jacquard::smol_str::format_smolstr;
21052105+ use jacquard::types::aturi::AtUri;
21062106+ use weaver_api::sh_weaver::domain::resolve_document::ResolveDocument;
21072107+ use weaver_api::site_standard::document::Document;
21082108+ use weaver_renderer::pckt::{PcktRenderContext, render_document_content};
21092109+21102110+ let ident_val = ident();
21112111+ let rkey = publication_rkey();
21122112+ let path_val = path();
21132113+21142114+ let author_did = match &ident_val {
21152115+ AtIdentifier::Did(d) => d.clone().into_static(),
21162116+ AtIdentifier::Handle(h) => fetcher.resolve_handle(h).await.ok()?.into_static(),
21172117+ };
21182118+21192119+ let pub_uri_str =
21202120+ format_smolstr!("at://{}/site.standard.publication/{}", author_did, rkey);
21212121+ let pub_uri = AtUri::new(&pub_uri_str).ok()?;
21222122+21232123+ let output = fetcher
21242124+ .send(
21252125+ ResolveDocument::new()
21262126+ .publication(pub_uri)
21272127+ .path(&path_val)
21282128+ .build(),
21292129+ )
21302130+ .await
21312131+ .ok()?
21322132+ .into_output()
21332133+ .ok()?;
21342134+21352135+ let doc_view = output.document;
21362136+ let document = jacquard::from_data::<Document>(&doc_view.record).ok()?;
21372137+21382138+ let rendered_html = if let Some(content) = &document.content {
21392139+ let ctx = PcktRenderContext::new(author_did);
21402140+ render_document_content(content, &ctx, &*fetcher.get_client()).await
21412141+ } else {
21422142+ String::new()
21432143+ };
21442144+21452145+ Some((serde_json::to_value(&doc_view).ok()?, rendered_html))
21462146+ }
21472147+ }));
21482148+21492149+ let memo = use_memo(use_reactive!(|res| {
21502150+ let res = res.as_ref().ok()?;
21512151+ if let Some(Some((doc_json, html))) = &*res.read() {
21522152+ let document = jacquard::from_json_value::<DocumentView>(doc_json.clone()).ok()?;
21532153+ Some(CustomDomainDocumentData {
21542154+ document,
21552155+ rendered_html: html.clone(),
21562156+ })
21572157+ } else {
21582158+ None
21592159+ }
21602160+ }));
21612161+21622162+ (res, memo)
21632163+}
21642164+21652165+#[cfg(not(feature = "fullstack-server"))]
21662166+pub fn use_custom_domain_document_data(
21672167+ ident: ReadSignal<AtIdentifier<'static>>,
21682168+ publication_rkey: ReadSignal<SmolStr>,
21692169+ path: ReadSignal<String>,
21702170+) -> (
21712171+ Resource<Option<CustomDomainDocumentData>>,
21722172+ Memo<Option<CustomDomainDocumentData>>,
21732173+) {
21742174+ let fetcher = use_context::<crate::fetch::Fetcher>();
21752175+ let fetcher = fetcher.clone();
21762176+21772177+ let res = use_resource(move || {
21782178+ let fetcher = fetcher.clone();
21792179+ async move {
21802180+ use jacquard::IntoStatic;
21812181+ use jacquard::prelude::XrpcClient;
21822182+ use jacquard::smol_str::format_smolstr;
21832183+ use jacquard::types::aturi::AtUri;
21842184+ use weaver_api::sh_weaver::domain::resolve_document::ResolveDocument;
21852185+ use weaver_api::site_standard::document::Document;
21862186+ use weaver_renderer::pckt::{PcktRenderContext, render_document_content};
21872187+21882188+ let ident_val = ident();
21892189+ let rkey = publication_rkey();
21902190+ let path_val = path();
21912191+21922192+ let author_did = match &ident_val {
21932193+ AtIdentifier::Did(d) => d.clone().into_static(),
21942194+ AtIdentifier::Handle(h) => fetcher.resolve_handle(h).await.ok()?.into_static(),
21952195+ };
21962196+21972197+ let pub_uri_str =
21982198+ format_smolstr!("at://{}/site.standard.publication/{}", author_did, rkey);
21992199+ let pub_uri = AtUri::new(&pub_uri_str).ok()?;
22002200+22012201+ let output = fetcher
22022202+ .send(
22032203+ ResolveDocument::new()
22042204+ .publication(pub_uri)
22052205+ .path(&path_val)
22062206+ .build(),
22072207+ )
22082208+ .await
22092209+ .ok()?
22102210+ .into_output()
22112211+ .ok()?;
22122212+22132213+ let doc_view = output.document.into_static();
22142214+ let document = jacquard::from_data::<Document>(&doc_view.record).ok()?;
22152215+22162216+ let rendered_html = if let Some(content) = &document.content {
22172217+ let ctx = PcktRenderContext::new(author_did);
22182218+ render_document_content(content, &ctx, &*fetcher.get_client()).await
22192219+ } else {
22202220+ String::new()
22212221+ };
22222222+22232223+ Some(CustomDomainDocumentData {
22242224+ document: doc_view.clone(),
22252225+ rendered_html,
22262226+ })
22272227+ }
22282228+ });
22292229+22302230+ let memo = use_memo(move || res.cloned().flatten());
22312231+22322232+ (res, memo)
22332233+}
+76-12
crates/weaver-app/src/host_mode.rs
···55use jacquard::types::string::AtIdentifier;
66use serde::{Deserialize, Serialize};
7788+/// Unified host context resolved by middleware.
99+///
1010+/// This is inserted into request extensions by the host resolution middleware
1111+/// and read by the Dioxus app to determine which router to use.
1212+#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
1313+pub enum HostContext {
1414+ /// Main weaver.sh domain - use full Route enum.
1515+ MainDomain,
1616+ /// Subdomain hosting (notebook.weaver.sh) - use SubdomainRoute.
1717+ Subdomain(SubdomainContext),
1818+ /// Custom domain (myblog.com) - use CustomDomainRoute.
1919+ CustomDomain(CustomDomainContext),
2020+}
2121+2222+impl HostContext {
2323+ /// Get the link mode for this host context.
2424+ pub fn link_mode(&self) -> LinkMode {
2525+ match self {
2626+ HostContext::MainDomain => LinkMode::MainDomain,
2727+ HostContext::Subdomain(_) => LinkMode::Subdomain,
2828+ HostContext::CustomDomain(_) => LinkMode::CustomDomain,
2929+ }
3030+ }
3131+}
3232+833/// Context for subdomain routing - identifies the notebook being served.
934#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
1035#[serde(bound(deserialize = ""))]
···3762 }
3863}
39646565+/// Context for custom domain routing - identifies the publication being served.
6666+#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
6767+#[serde(bound(deserialize = ""))]
6868+pub struct CustomDomainContext {
6969+ /// Custom domain (e.g., "myblog.com").
7070+ pub domain: SmolStr,
7171+ /// DID of the publication owner.
7272+ #[serde(deserialize_with = "deserialize_static_ident")]
7373+ pub owner: AtIdentifier<'static>,
7474+ /// Publication rkey.
7575+ pub publication_rkey: SmolStr,
7676+ /// Publication name.
7777+ pub publication_name: SmolStr,
7878+ /// For weaver-backed publications, the backing notebook URI.
7979+ pub notebook_uri: Option<SmolStr>,
8080+}
8181+4082/// Link mode for generating appropriate URLs based on host context.
4183///
4284/// Components use this context to generate links that work on both
···4890 MainDomain,
4991 /// Subdomain - simplified paths like /:entry
5092 Subdomain,
9393+ /// Custom domain - paths like /:path for publications
9494+ CustomDomain,
5195}
52965397impl LinkMode {
···56100 matches!(self, LinkMode::Subdomain)
57101 }
58102103103+ /// Check if we're in a hosted mode (subdomain or custom domain).
104104+ pub fn is_hosted(&self) -> bool {
105105+ matches!(self, LinkMode::Subdomain | LinkMode::CustomDomain)
106106+ }
107107+59108 /// Generate link to a notebook entry by title.
60109 pub fn entry_link(
61110 &self,
···65114 ) -> SmolStr {
66115 match self {
67116 LinkMode::MainDomain => format_smolstr!("/{}/{}/{}", ident, book_title, entry_title),
6868- LinkMode::Subdomain => format_smolstr!("/{}", entry_title),
117117+ LinkMode::Subdomain | LinkMode::CustomDomain => format_smolstr!("/{}", entry_title),
69118 }
70119 }
71120···78127 ) -> SmolStr {
79128 match self {
80129 LinkMode::MainDomain => format_smolstr!("/{}/{}/e/{}", ident, book_title, rkey),
8181- LinkMode::Subdomain => format_smolstr!("/e/{}", rkey),
130130+ LinkMode::Subdomain | LinkMode::CustomDomain => format_smolstr!("/e/{}", rkey),
82131 }
83132 }
84133···91140 ) -> SmolStr {
92141 match self {
93142 LinkMode::MainDomain => format_smolstr!("/{}/{}/e/{}/edit", ident, book_title, rkey),
9494- LinkMode::Subdomain => format_smolstr!("/e/{}/edit", rkey),
143143+ LinkMode::Subdomain | LinkMode::CustomDomain => format_smolstr!("/e/{}/edit", rkey),
95144 }
96145 }
97146···99148 pub fn notebook_link(&self, ident: &AtIdentifier<'_>, book_title: &str) -> SmolStr {
100149 match self {
101150 LinkMode::MainDomain => format_smolstr!("/{}/{}", ident, book_title),
102102- LinkMode::Subdomain => SmolStr::new_static("/"),
151151+ LinkMode::Subdomain | LinkMode::CustomDomain => SmolStr::new_static("/"),
103152 }
104153 }
105154···107156 pub fn profile_link(&self, ident: &AtIdentifier<'_>) -> SmolStr {
108157 match self {
109158 LinkMode::MainDomain => format_smolstr!("/{}", ident),
110110- LinkMode::Subdomain => format_smolstr!("/u/{}", ident),
159159+ LinkMode::Subdomain | LinkMode::CustomDomain => format_smolstr!("/u/{}", ident),
111160 }
112161 }
113162···115164 pub fn standalone_entry_link(&self, ident: &AtIdentifier<'_>, rkey: &str) -> SmolStr {
116165 match self {
117166 LinkMode::MainDomain => format_smolstr!("/{}/e/{}", ident, rkey),
118118- // Standalone entries don't exist in subdomain mode - link to main domain
119119- LinkMode::Subdomain => format_smolstr!("{}/{}/e/{}", WEAVER_APP_HOST, ident, rkey),
167167+ // Standalone entries don't exist in hosted mode - link to main domain
168168+ LinkMode::Subdomain | LinkMode::CustomDomain => {
169169+ format_smolstr!("{}/{}/e/{}", WEAVER_APP_HOST, ident, rkey)
170170+ }
120171 }
121172 }
122173···125176 match self {
126177 LinkMode::MainDomain => format_smolstr!("/{}/e/{}/edit", ident, rkey),
127178 // Edit on main domain
128128- LinkMode::Subdomain => format_smolstr!("{}/{}/e/{}/edit", WEAVER_APP_HOST, ident, rkey),
179179+ LinkMode::Subdomain | LinkMode::CustomDomain => {
180180+ format_smolstr!("{}/{}/e/{}/edit", WEAVER_APP_HOST, ident, rkey)
181181+ }
129182 }
130183 }
131184···135188 (LinkMode::MainDomain, Some(nb)) => format_smolstr!("/{}/new?notebook={}", ident, nb),
136189 (LinkMode::MainDomain, None) => format_smolstr!("/{}/new", ident),
137190 // Drafts are on main domain
138138- (LinkMode::Subdomain, Some(nb)) => {
191191+ (LinkMode::Subdomain | LinkMode::CustomDomain, Some(nb)) => {
139192 format_smolstr!("{}/{}/new?notebook={}", WEAVER_APP_HOST, ident, nb)
140193 }
141141- (LinkMode::Subdomain, None) => format_smolstr!("{}/{}/new", WEAVER_APP_HOST, ident),
194194+ (LinkMode::Subdomain | LinkMode::CustomDomain, None) => {
195195+ format_smolstr!("{}/{}/new", WEAVER_APP_HOST, ident)
196196+ }
142197 }
143198 }
144199···146201 pub fn drafts_link(&self, ident: &AtIdentifier<'_>) -> SmolStr {
147202 match self {
148203 LinkMode::MainDomain => format_smolstr!("/{}/drafts", ident),
149149- LinkMode::Subdomain => format_smolstr!("{}/{}/drafts", WEAVER_APP_HOST, ident),
204204+ LinkMode::Subdomain | LinkMode::CustomDomain => {
205205+ format_smolstr!("{}/{}/drafts", WEAVER_APP_HOST, ident)
206206+ }
150207 }
151208 }
152209···154211 pub fn invites_link(&self, ident: &AtIdentifier<'_>) -> SmolStr {
155212 match self {
156213 LinkMode::MainDomain => format_smolstr!("/{}/invites", ident),
157157- LinkMode::Subdomain => format_smolstr!("{}/{}/invites", WEAVER_APP_HOST, ident),
214214+ LinkMode::Subdomain | LinkMode::CustomDomain => {
215215+ format_smolstr!("{}/{}/invites", WEAVER_APP_HOST, ident)
216216+ }
158217 }
218218+ }
219219+220220+ /// Generate link to a document by path (for custom domain publications).
221221+ pub fn document_link(&self, path: &str) -> SmolStr {
222222+ format_smolstr!("/{}", path.trim_start_matches('/'))
159223 }
160224}
+36-86
crates/weaver-app/src/lib.rs
···2929pub mod record_utils;
3030pub mod service_worker;
31313232+pub mod custom_domain_app;
3333+#[cfg(feature = "server")]
3434+pub mod middleware;
3235pub mod subdomain_app;
3336pub mod views;
3737+#[cfg(feature = "server")]
3838+pub mod well_known;
34393535-pub use host_mode::{LinkMode, SubdomainContext};
3636-pub use subdomain_app::SubdomainApp;
3737-pub use subdomain_app::SubdomainRoute;
4040+pub use custom_domain_app::{CustomDomainApp, CustomDomainRoute};
4141+pub use host_mode::{CustomDomainContext, HostContext, LinkMode, SubdomainContext};
4242+pub use subdomain_app::{SubdomainApp, SubdomainRoute};
38433944use auth::{AuthState, AuthStore};
4045use components::{EntryPage, Repository, RepositoryIndex};
···4752 RecordIndex, RecordPage, StandaloneEntry, StandaloneEntryEdit, StandaloneEntryNsid, TermsPage,
4853 WhiteWindEntry, WhiteWindEntryNsid,
4954};
5050-5151-use crate::{
5252- env::WEAVER_APP_DOMAIN,
5353- subdomain_app::{extract_subdomain, lookup_subdomain_context},
5454-};
5555-5656-/// Reserved subdomains that should not be used for notebooks.
5757-const RESERVED_SUBDOMAINS: &[&str] = &[
5858- "www", "api", "admin", "app", "auth", "cdn", "alpha", "beta", "staging", "index",
5959-];
60556156#[derive(Debug, Clone, Routable, PartialEq)]
6257#[rustfmt::skip]
···150145 ))
151146 });
152147148148+ // Read host context from request extensions (set by middleware).
153149 #[cfg(feature = "fullstack-server")]
154154- let ctx_resource = use_server_future({
155155- let fetcher = fetcher.clone();
156156- move || {
157157- let fetcher = fetcher.clone();
158158- async move {
159159- use dioxus::fullstack::FullstackContext;
160160- use http::header::HOST;
161161-162162- // Get host header from request
163163- let Some(ctx) = FullstackContext::current() else {
164164- tracing::warn!("No FullstackContext available");
165165- return None;
166166- };
167167- let parts = ctx.parts_mut();
168168-169169- let Some(host_header) = parts.headers.get(HOST) else {
170170- tracing::warn!("No Host header in request");
171171- return None;
172172- };
173173- let Ok(host) = host_header.to_str() else {
174174- tracing::warn!("Host header not valid UTF-8");
175175- return None;
176176- };
177177-178178- let host_str = host.split(':').next().unwrap_or(host);
179179- let Some(subdomain) = extract_subdomain(host_str, WEAVER_APP_DOMAIN) else {
180180- tracing::info!(
181181- host_str,
182182- domain = WEAVER_APP_DOMAIN,
183183- "Not a subdomain request"
184184- );
185185- return None;
186186- };
187187-188188- // Check if subdomain is reserved
189189- if RESERVED_SUBDOMAINS.contains(&subdomain.as_str()) {
190190- tracing::info!(subdomain, "Reserved subdomain, skipping notebook lookup");
191191- return None;
192192- }
150150+ let host_ctx = {
151151+ use_server_cached(|| {
152152+ use dioxus::fullstack::FullstackContext;
193153194194- // Look up notebook by global path
195195- let result = lookup_subdomain_context(&fetcher, &subdomain).await;
196196- if result.is_none() {
197197- tracing::warn!(subdomain, "Notebook lookup failed for subdomain");
198198- }
199199- result
200200- }
201201- }
202202- })?;
203203-204204- #[cfg(feature = "fullstack-server")]
205205- let ctx = match &*ctx_resource.read() {
206206- Some(ctx) => ctx.clone(),
207207- None => {
208208- return rsx! { div { "Loading..." } };
209209- }
154154+ let ctx = FullstackContext::current();
155155+ ctx.and_then(|c| {
156156+ let parts = c.parts_mut();
157157+ parts.extensions.get::<HostContext>().cloned()
158158+ })
159159+ .unwrap_or(HostContext::MainDomain)
160160+ })
210161 };
211162212163 #[cfg(not(feature = "fullstack-server"))]
213213- let ctx = { None::<SubdomainContext> };
164164+ let host_ctx = HostContext::MainDomain;
214165215166 let auth_state = use_signal(|| AuthState::default());
216167 #[allow(unused)]
217168 let auth_state = use_context_provider(|| auth_state);
218169219219- // Provide link mode for router-agnostic link generation (subdomain mode)
220220- let sub = use_context_provider(|| {
221221- if ctx.is_some() {
222222- LinkMode::Subdomain
223223- } else {
224224- LinkMode::MainDomain
225225- }
226226- });
170170+ // Provide link mode for router-agnostic link generation.
171171+ let _link_mode = use_context_provider(|| host_ctx.link_mode());
227172228173 #[cfg(all(target_family = "wasm", target_os = "unknown"))]
229174 let restore_result = {
···251196252197 use_context_provider(|| restore_result);
253198254254- if sub == LinkMode::Subdomain {
255255- tracing::info!("App: rendering SubdomainApp");
256256- use_context_provider(|| ctx.unwrap());
257257- rsx! {
258258- SubdomainApp {}
199199+ // Dispatch to appropriate app based on host context.
200200+ match host_ctx {
201201+ HostContext::Subdomain(ctx) => {
202202+ tracing::info!("App: rendering SubdomainApp");
203203+ use_context_provider(|| ctx);
204204+ rsx! { SubdomainApp {} }
205205+ }
206206+ HostContext::CustomDomain(ctx) => {
207207+ tracing::info!("App: rendering CustomDomainApp");
208208+ use_context_provider(|| ctx);
209209+ rsx! { CustomDomainApp {} }
259210 }
260260- } else {
261261- tracing::info!("App: rendering MainDomainApp");
262262- rsx! {
263263- MainDomainApp {}
211211+ HostContext::MainDomain => {
212212+ tracing::info!("App: rendering MainDomainApp");
213213+ rsx! { MainDomainApp {} }
264214 }
265215 }
266216}
+12-10
crates/weaver-app/src/main.rs
···1515static ALLOCATOR: LockedAllocator<FreeListAllocator> =
1616 LockedAllocator::new(FreeListAllocator::new());
17171818-/// Base domain for subdomain extraction.
1919-#[cfg(feature = "server")]
2020-const BASE_DOMAIN: &str = weaver_app::env::WEAVER_APP_DOMAIN;
2121-2222-/// Reserved subdomains that should not be used for notebooks.
2323-#[cfg(feature = "server")]
2424-const RESERVED_SUBDOMAINS: &[&str] = &[
2525- "www", "api", "admin", "app", "auth", "cdn", "alpha", "beta", "staging", "index",
2626-];
2727-2818fn main() {
2919 // Set up better panic messages for wasm
3020 #[cfg(target_arch = "wasm32")]
···9888 axum::Router::new()
9989 .route("/favicon.ico", get(weaver_app::favicon))
10090 .serve_dioxus_application(ServeConfig::builder(), App)
9191+ // Host context resolution.
9292+ .layer(middleware::from_fn({
9393+ let fetcher = fetcher.clone();
9494+ move |req: Request, next: Next| {
9595+ let fetcher = fetcher.clone();
9696+ async move {
9797+ weaver_app::middleware::host_context_middleware(req, next, fetcher)
9898+ .await
9999+ }
100100+ }
101101+ }))
102102+ // Insert fetcher and blob cache into extensions.
101103 .layer(middleware::from_fn({
102104 let blob_cache = blob_cache.clone();
103105 let fetcher = fetcher.clone();
+182
crates/weaver-app/src/middleware.rs
···11+//! Axum middleware for host-based routing.
22+33+use std::sync::Arc;
44+55+use axum::{
66+ extract::Request,
77+ http::header::HOST,
88+ middleware::Next,
99+ response::{IntoResponse, Redirect, Response},
1010+};
1111+use jacquard::IntoStatic;
1212+use jacquard::client::AgentSessionExt;
1313+use jacquard::smol_str::SmolStr;
1414+use jacquard::smol_str::ToSmolStr;
1515+1616+use crate::{
1717+ env::WEAVER_APP_DOMAIN,
1818+ fetch::Fetcher,
1919+ host_mode::{CustomDomainContext, HostContext, SubdomainContext},
2020+ subdomain_app::{extract_subdomain, lookup_subdomain_context},
2121+};
2222+2323+/// Reserved subdomains that should not be used for notebooks.
2424+const RESERVED_SUBDOMAINS: &[&str] = &[
2525+ "www", "api", "admin", "app", "auth", "cdn", "alpha", "beta", "staging", "index",
2626+];
2727+2828+/// Prefix for encoded publication hostnames (nb-{encoded}.weaver.sh).
2929+const ENCODED_PUBLICATION_PREFIX: &str = "nb-";
3030+3131+/// Middleware that resolves host context and inserts it into request extensions.
3232+///
3333+/// This handles:
3434+/// - Encoded publication hostnames (nb-xxx.pub.weaver.sh) → redirect to real domain
3535+/// - Subdomain routing (notebook.weaver.sh) → SubdomainContext
3636+/// - Custom domain routing (myblog.com) → CustomDomainContext
3737+/// - Main domain (weaver.sh) → MainDomain
3838+pub async fn host_context_middleware(
3939+ mut req: Request,
4040+ next: Next,
4141+ fetcher: Arc<Fetcher>,
4242+) -> Response {
4343+ // Extract everything we need from the request BEFORE any async calls.
4444+ // The body type isn't Sync, so we can't hold &req across await points.
4545+ let host = extract_host(&req);
4646+ let path = req.uri().path().to_string();
4747+ let query = req
4848+ .uri()
4949+ .query()
5050+ .map(|q| format!("?{}", q))
5151+ .unwrap_or_default();
5252+5353+ let Some(host) = host else {
5454+ tracing::warn!("No Host header in request");
5555+ req.extensions_mut().insert(HostContext::MainDomain);
5656+ return next.run(req).await;
5757+ };
5858+5959+ // Strip port if present.
6060+ let host_str = host.split(':').next().unwrap_or(&host).to_string();
6161+6262+ // Check if this is a weaver domain subdomain.
6363+ if let Some(subdomain) = extract_subdomain(&host_str, WEAVER_APP_DOMAIN) {
6464+ // Check for encoded publication hostname (nb-xxx.pub.weaver.sh).
6565+ if let Some(redirect_url) =
6666+ handle_encoded_publication(&subdomain, &path, &query, fetcher.clone()).await
6767+ {
6868+ return Redirect::permanent(&redirect_url).into_response();
6969+ }
7070+7171+ // Check for reserved subdomains.
7272+ if RESERVED_SUBDOMAINS.contains(&subdomain.as_str()) {
7373+ tracing::debug!(subdomain, "Reserved subdomain, using main domain");
7474+ req.extensions_mut().insert(HostContext::MainDomain);
7575+ return next.run(req).await;
7676+ }
7777+7878+ // Try to look up notebook for this subdomain.
7979+ if let Some(ctx) = lookup_subdomain_context(&fetcher, &subdomain).await {
8080+ tracing::debug!(subdomain, "Resolved subdomain context");
8181+ req.extensions_mut().insert(HostContext::Subdomain(ctx));
8282+ return next.run(req).await;
8383+ }
8484+8585+ // Subdomain not found, fall through to main domain.
8686+ tracing::warn!(subdomain, "Subdomain not found, using main domain");
8787+ req.extensions_mut().insert(HostContext::MainDomain);
8888+ return next.run(req).await;
8989+ }
9090+9191+ // Not a weaver subdomain - check for custom domain.
9292+ if let Some(ctx) = lookup_custom_domain(fetcher.clone(), &host_str).await {
9393+ tracing::debug!(domain = host_str, "Resolved custom domain context");
9494+ req.extensions_mut().insert(HostContext::CustomDomain(ctx));
9595+ return next.run(req).await;
9696+ }
9797+9898+ // Unknown domain, use main domain routing.
9999+ tracing::debug!(host = host_str, "Unknown host, using main domain");
100100+ req.extensions_mut().insert(HostContext::MainDomain);
101101+ next.run(req).await
102102+}
103103+104104+/// Extract the Host header from the request.
105105+fn extract_host(req: &Request) -> Option<String> {
106106+ req.headers()
107107+ .get(HOST)?
108108+ .to_str()
109109+ .ok()
110110+ .map(|s| s.to_string())
111111+}
112112+113113+/// Handle encoded publication hostname (nb-{encoded}.weaver.sh).
114114+///
115115+/// Returns Some(redirect_url) if this is an encoded hostname that should redirect.
116116+async fn handle_encoded_publication(
117117+ subdomain: &str,
118118+ path: &str,
119119+ query: &str,
120120+ fetcher: Arc<Fetcher>,
121121+) -> Option<String> {
122122+ // Check if subdomain matches pattern: nb-{encoded}
123123+ if !subdomain.starts_with(ENCODED_PUBLICATION_PREFIX) {
124124+ return None;
125125+ }
126126+127127+ // Decode the publication subdomain.
128128+ let Some((did, rkey)) = weaver_common::domain_encoding::decode_publication_subdomain(subdomain)
129129+ else {
130130+ tracing::warn!(subdomain, "Failed to decode publication subdomain");
131131+ return None;
132132+ };
133133+134134+ // Look up the publication to get the real domain.
135135+ let domain = lookup_publication_domain(fetcher, did.as_str(), rkey.as_str()).await?;
136136+137137+ Some(format!("https://{}{}{}", domain, path, query))
138138+}
139139+140140+/// Look up publication domain by DID and rkey.
141141+async fn lookup_publication_domain(fetcher: Arc<Fetcher>, did: &str, rkey: &str) -> Option<String> {
142142+ use jacquard::types::string::Uri;
143143+ use weaver_api::site_standard::publication::Publication;
144144+145145+ let uri_str = format!("at://{}/site.standard.publication/{}", did, rkey);
146146+ let uri = Publication::uri(&uri_str).ok()?;
147147+148148+ let record = fetcher.fetch_record(&uri).await.ok()?;
149149+150150+ // Extract domain from the already-parsed publication URL.
151151+ match &record.value.url {
152152+ Uri::Https(url) | Uri::Wss(url) => url.host_str().map(|h| h.to_string()),
153153+ _ => None,
154154+ }
155155+}
156156+157157+/// Look up custom domain context.
158158+async fn lookup_custom_domain(fetcher: Arc<Fetcher>, domain: &str) -> Option<CustomDomainContext> {
159159+ use jacquard::prelude::XrpcClient;
160160+ use weaver_api::sh_weaver::domain::resolve_by_domain::ResolveByDomain;
161161+162162+ let output = fetcher
163163+ .send(ResolveByDomain::new().domain(domain).build())
164164+ .await
165165+ .ok()?
166166+ .into_output()
167167+ .ok()?;
168168+169169+ let pub_view = output.publication;
170170+171171+ Some(CustomDomainContext {
172172+ domain: SmolStr::new(domain),
173173+ owner: jacquard::types::string::AtIdentifier::Did(
174174+ jacquard::types::string::Did::new(&pub_view.did)
175175+ .ok()?
176176+ .into_static(),
177177+ ),
178178+ publication_rkey: pub_view.rkey.to_smolstr(),
179179+ publication_name: pub_view.name.to_smolstr(),
180180+ notebook_uri: pub_view.notebook_uri.map(|u| u.to_smolstr()),
181181+ })
182182+}
+3
crates/weaver-app/src/subdomain_app.rs
···100100/// Root component for subdomain app.
101101#[component]
102102pub fn SubdomainApp() -> Element {
103103+ tracing::info!("SubdomainApp: rendering root");
103104 rsx! {
104105 document::Link { rel: "icon", href: crate::FAVICON }
105106 document::Link { rel: "preconnect", href: "https://fonts.googleapis.com" }
···118119/// Landing page - check for custom "/" entry, else show notebook index.
119120#[component]
120121fn SubdomainLanding() -> Element {
122122+ tracing::info!("SubdomainLanding: start");
121123 let ctx = use_context::<SubdomainContext>();
124124+ tracing::info!("SubdomainLanding: got context, rendering");
122125123126 // TODO: Check for entry with custom path "/" for this notebook.
124127 // For now, just render the notebook index.
+6-3
crates/weaver-app/src/views/notebook.rs
···6969 ident: ReadSignal<AtIdentifier<'static>>,
7070 book_title: ReadSignal<SmolStr>,
7171) -> Element {
7272- tracing::debug!(
7373- "NotebookIndex component rendering for ident: {:?}, book: {}",
7272+ tracing::info!(
7373+ "NotebookIndex: start, ident={:?}, book={}",
7474 ident(),
7575 book_title()
7676 );
7777 // Fetch full notebook metadata with SSR support
7878 // IMPORTANT: Call ALL hooks before any ? early returns to maintain hook order
7979 let (notebook_result, notebook_data) = data::use_notebook(ident, book_title);
8080+ tracing::info!("NotebookIndex: use_notebook returned");
8081 let (entries_result, entries_resource) = data::use_notebook_entries(ident, book_title);
8181- tracing::debug!("NotebookIndex got notebook data and entries");
8282+ tracing::info!("NotebookIndex: use_notebook_entries returned");
82838384 #[cfg(feature = "fullstack-server")]
8485 notebook_result?;
8686+ tracing::info!("NotebookIndex: past notebook_result?");
85878688 #[cfg(feature = "fullstack-server")]
8789 entries_result?;
9090+ tracing::info!("NotebookIndex: past entries_result?");
88918992 // Check ownership for "Add Entry" button
9093 let auth_state = use_context::<Signal<AuthState>>();
+5
crates/weaver-app/src/views/subdomain_navbar.rs
···26262727#[component]
2828pub fn SubdomainNavbar() -> Element {
2929+ tracing::info!("SubdomainNavbar: start");
2930 let ctx = use_context::<SubdomainContext>();
3031 let route = use_route::<SubdomainRoute>();
3132 let auth_state = use_context::<Signal<AuthState>>();
3333+ tracing::info!("SubdomainNavbar: got context");
32343335 #[allow(unused)]
3436 let fetcher = use_context::<Fetcher>();
···180182181183#[component]
182184fn AuthorProfileLink(ident: ReadSignal<AtIdentifier<'static>>) -> Element {
185185+ tracing::info!("AuthorProfileLink: start, ident={:?}", ident());
183186 let (handle_res, handle) = use_handle(ident);
187187+ tracing::info!("AuthorProfileLink: use_handle returned");
184188185189 #[cfg(feature = "fullstack-server")]
186190 handle_res?;
191191+ tracing::info!("AuthorProfileLink: past handle_res check");
187192188193 rsx! {
189194 Link {
+37
crates/weaver-app/src/well_known.rs
···11+//! Well-known endpoints for site.standard compatibility.
22+33+use crate::host_mode::CustomDomainContext;
44+use axum::{Json, http::StatusCode};
55+use jacquard::smol_str::{SmolStr, format_smolstr};
66+use serde::Serialize;
77+88+/// Well-known publication response per site.standard spec.
99+#[derive(Debug, Clone, Serialize)]
1010+#[serde(rename_all = "camelCase")]
1111+pub struct WellKnownPublication {
1212+ pub publication_uri: SmolStr,
1313+ pub name: SmolStr,
1414+ pub url: SmolStr,
1515+}
1616+1717+/// Handle /.well-known/site.standard.publication
1818+///
1919+/// Returns publication info for the current custom domain.
2020+/// This handler expects CustomDomainContext to be set by middleware.
2121+pub async fn well_known_publication(
2222+ ctx: Option<axum::Extension<CustomDomainContext>>,
2323+) -> Result<Json<WellKnownPublication>, StatusCode> {
2424+ let ctx = ctx.ok_or(StatusCode::NOT_FOUND)?;
2525+2626+ let publication_uri = format_smolstr!(
2727+ "at://{}/site.standard.publication/{}",
2828+ ctx.owner,
2929+ ctx.publication_rkey
3030+ );
3131+3232+ Ok(Json(WellKnownPublication {
3333+ publication_uri,
3434+ name: ctx.publication_name.clone(),
3535+ url: format_smolstr!("https://{}", ctx.domain),
3636+ }))
3737+}
+112
crates/weaver-common/src/domain_encoding.rs
···11+//! DNS-safe encoding for publication AT-URIs.
22+//!
33+//! Custom domains use self-describing CNAME records pointing to
44+//! `nb-{encoded-did}-{rkey}.weaver.sh`. This module handles
55+//! encoding and decoding the subdomain portion.
66+77+use jacquard::IntoStatic;
88+use jacquard::types::string::{Did, Tid};
99+1010+const PREFIX: &str = "nb-";
1111+1212+/// Encode a Publication AT-URI into a DNS-safe subdomain.
1313+///
1414+/// Encoding rules:
1515+/// - DID `:` separators become `-`
1616+/// - `did:web` dots become `_` (underscores are invalid in domain names, so unambiguous)
1717+/// - rkey is appended as last segment (TIDs never contain hyphens)
1818+///
1919+/// Examples:
2020+/// - `did:plc:z72i7hdynmk6r22` + `3jui7kd2y2e2b` → `nb-plc-z72i7hdynmk6r22-3jui7kd2y2e2b`
2121+/// - `did:web:example.com` + `3jui7kd2y2e2b` → `nb-web-example_com-3jui7kd2y2e2b`
2222+pub fn encode_publication_subdomain(did: &Did, rkey: &Tid) -> String {
2323+ let did_str = did.as_str();
2424+2525+ // did:plc:abc123 -> plc-abc123
2626+ // did:web:example.com -> web-example_com
2727+ let encoded_did = did_str
2828+ .strip_prefix("did:")
2929+ .expect("valid DID")
3030+ .replace(':', "-")
3131+ .replace('.', "_");
3232+3333+ format!("{}{}-{}", PREFIX, encoded_did, rkey.as_str())
3434+}
3535+3636+/// Decode a publication subdomain back to DID and rkey.
3737+///
3838+/// Parsing strategy: work from both ends since rkeys (TIDs) never contain hyphens.
3939+pub fn decode_publication_subdomain(subdomain: &str) -> Option<(Did<'static>, Tid)> {
4040+ let inner = subdomain.strip_prefix(PREFIX)?;
4141+4242+ // Split at the LAST hyphen - rkey is on the right (TIDs have no hyphens)
4343+ let (did_part, rkey_str) = inner.rsplit_once('-')?;
4444+4545+ // Parse rkey as TID
4646+ let rkey = Tid::from(rkey_str.to_owned());
4747+4848+ // Reconstruct DID from encoded form
4949+ // plc-abc123 -> did:plc:abc123
5050+ // web-example_com -> did:web:example.com
5151+ let (method, identifier) = did_part.split_once('-')?;
5252+ let decoded_identifier = identifier.replace('_', ".");
5353+ let did_str = format!("did:{}:{}", method, decoded_identifier);
5454+ let did = Did::new(&did_str).ok()?;
5555+5656+ Some((did.into_static(), rkey))
5757+}
5858+5959+#[cfg(test)]
6060+mod tests {
6161+ use super::*;
6262+ use jacquard::IntoStatic;
6363+6464+ #[test]
6565+ fn roundtrip_did_plc() {
6666+ let did = Did::new("did:plc:z72i7hdynmk6r22").unwrap();
6767+ let rkey = Tid::from("3jui7kd2y2e2b".to_owned());
6868+6969+ let encoded = encode_publication_subdomain(&did, &rkey);
7070+ assert_eq!(encoded, "nb-plc-z72i7hdynmk6r22-3jui7kd2y2e2b");
7171+7272+ let (decoded_did, decoded_rkey) = decode_publication_subdomain(&encoded).unwrap();
7373+ assert_eq!(decoded_did, did.into_static());
7474+ assert_eq!(decoded_rkey, rkey);
7575+ }
7676+7777+ #[test]
7878+ fn roundtrip_did_web() {
7979+ let did = Did::new("did:web:example.com").unwrap();
8080+ let rkey = Tid::from("3jui7kd2y2e2b".to_owned());
8181+8282+ let encoded = encode_publication_subdomain(&did, &rkey);
8383+ assert_eq!(encoded, "nb-web-example_com-3jui7kd2y2e2b");
8484+8585+ let (decoded_did, decoded_rkey) = decode_publication_subdomain(&encoded).unwrap();
8686+ assert_eq!(decoded_did, did.into_static());
8787+ assert_eq!(decoded_rkey, rkey);
8888+ }
8989+9090+ #[test]
9191+ fn roundtrip_did_web_with_hyphens() {
9292+ let did = Did::new("did:web:my-cool-site.example.com").unwrap();
9393+ let rkey = Tid::from("3jui7kd2y2e2b".to_owned());
9494+9595+ let encoded = encode_publication_subdomain(&did, &rkey);
9696+ assert_eq!(encoded, "nb-web-my-cool-site_example_com-3jui7kd2y2e2b");
9797+9898+ let (decoded_did, decoded_rkey) = decode_publication_subdomain(&encoded).unwrap();
9999+ assert_eq!(decoded_did, did.into_static());
100100+ assert_eq!(decoded_rkey, rkey);
101101+ }
102102+103103+ #[test]
104104+ fn decode_invalid_prefix() {
105105+ assert!(decode_publication_subdomain("foo-plc-abc123-rkey").is_none());
106106+ }
107107+108108+ #[test]
109109+ fn decode_missing_method() {
110110+ assert!(decode_publication_subdomain("nb-abc123").is_none());
111111+ }
112112+}
+2
crates/weaver-common/src/lib.rs
···44#[cfg(feature = "cache")]
55pub mod cache;
66pub mod constellation;
77+pub mod domain_encoding;
78pub mod error;
89#[cfg(feature = "perf")]
910pub mod perf;
···15161617// Re-export jacquard for convenience
1718pub use agent::{SessionPeer, WeaverExt};
1919+pub use domain_encoding::{decode_publication_subdomain, encode_publication_subdomain};
1820pub use error::WeaverError;
19212022// Re-export blake3 for topic hashing
···11+-- Denormalized view for fast custom domain to publication lookup
22+-- This is the main lookup table for routing custom domain requests
33+44+CREATE TABLE IF NOT EXISTS custom_domains (
55+ -- Domain being claimed
66+ domain String,
77+88+ -- Publication details
99+ publication_did String,
1010+ publication_rkey String,
1111+ publication_name String,
1212+ publication_url String,
1313+ cname_target String,
1414+1515+ -- For conflict resolution: first claim wins
1616+ created_at DateTime64(3),
1717+ indexed_at DateTime64(3) DEFAULT now64(3),
1818+1919+ -- Soft delete when publication is deleted or URL changes
2020+ deleted_at DateTime64(3) DEFAULT toDateTime64(0, 3)
2121+)
2222+ENGINE = ReplacingMergeTree(indexed_at)
2323+ORDER BY (domain);
2424+2525+-- MV to populate from publications
2626+CREATE MATERIALIZED VIEW IF NOT EXISTS custom_domains_mv TO custom_domains AS
2727+SELECT
2828+ domain,
2929+ did AS publication_did,
3030+ rkey AS publication_rkey,
3131+ name AS publication_name,
3232+ url AS publication_url,
3333+ cname_target,
3434+ event_time AS created_at,
3535+ indexed_at,
3636+ deleted_at
3737+FROM publications
3838+WHERE domain != '' AND deleted_at = toDateTime64(0, 3);
···138138 /// List entries for a specific notebook, ordered by position in the notebook.
139139 ///
140140 /// Uses notebook_entries table to get entries that belong to this notebook.
141141- /// Deduplicates entries by rkey, keeping the most recently updated version.
141141+ /// Query is structured to avoid expensive double-FINAL joins by:
142142+ /// 1. First filtering notebook_entries in a subquery with argMax for dedup
143143+ /// 2. Then joining only those specific entries
142144 pub async fn list_notebook_entries(
143145 &self,
144146 notebook_did: &str,
···146148 limit: u32,
147149 cursor: Option<u32>,
148150 ) -> Result<Vec<EntryRow>, IndexError> {
149149- use std::collections::HashMap;
150150-151151+ // Two-phase query to avoid memory-expensive FINAL on large tables:
152152+ // 1. Get entry refs from notebook_entries using argMax dedup (no FINAL)
153153+ // 2. Join only those specific entries (targeted lookup, not full table FINAL)
151154 let query = r#"
155155+ WITH entry_refs AS (
156156+ SELECT
157157+ entry_did,
158158+ entry_rkey,
159159+ argMax(position, indexed_at) AS position
160160+ FROM notebook_entries
161161+ WHERE notebook_did = ?
162162+ AND notebook_rkey = ?
163163+ GROUP BY entry_did, entry_rkey
164164+ HAVING position > ?
165165+ ORDER BY position ASC
166166+ LIMIT ?
167167+ )
152168 SELECT
153169 e.did AS did,
154170 e.rkey AS rkey,
155155- e.cid AS cid,
156156- e.uri AS uri,
157157- e.title AS title,
158158- e.path AS path,
159159- e.tags AS tags,
160160- e.author_dids AS author_dids,
161161- e.created_at AS created_at,
162162- e.updated_at AS updated_at,
163163- e.indexed_at AS indexed_at,
164164- e.record AS record
165165- FROM notebook_entries ne FINAL
166166- INNER JOIN entries e FINAL ON
167167- e.did = ne.entry_did
168168- AND e.rkey = ne.entry_rkey
169169- AND e.deleted_at = toDateTime64(0, 3)
170170- WHERE ne.notebook_did = ?
171171- AND ne.notebook_rkey = ?
172172- AND ne.position > ?
173173- ORDER BY ne.position ASC
174174- LIMIT ?
171171+ argMax(e.cid, e.indexed_at) AS cid,
172172+ argMax(e.uri, e.indexed_at) AS uri,
173173+ argMax(e.title, e.indexed_at) AS title,
174174+ argMax(e.path, e.indexed_at) AS path,
175175+ argMax(e.tags, e.indexed_at) AS tags,
176176+ argMax(e.author_dids, e.indexed_at) AS author_dids,
177177+ argMax(e.created_at, e.indexed_at) AS created_at,
178178+ argMax(e.updated_at, e.indexed_at) AS updated_at,
179179+ max(e.indexed_at) AS indexed_at,
180180+ argMax(e.record, e.indexed_at) AS record
181181+ FROM entries e
182182+ INNER JOIN entry_refs er ON e.did = er.entry_did AND e.rkey = er.entry_rkey
183183+ WHERE e.deleted_at = toDateTime64(0, 3)
184184+ GROUP BY e.did, e.rkey
185185+ ORDER BY any(er.position) ASC
175186 "#;
176187177188 let cursor_val = cursor.unwrap_or(0);
···182193 .bind(notebook_did)
183194 .bind(notebook_rkey)
184195 .bind(cursor_val)
185185- // Fetch extra to account for duplicates we'll filter out
186186- .bind(limit * 2)
196196+ .bind(limit)
187197 .fetch_all::<EntryRow>()
188198 .await
189199 .map_err(|e| ClickHouseError::Query {
···191201 source: e,
192202 })?;
193203194194- // Dedupe by rkey, keeping the most recently updated version
195195- let mut seen: HashMap<SmolStr, usize> = HashMap::new();
196196- let mut deduped: Vec<EntryRow> = Vec::with_capacity(rows.len());
197197-198198- for row in rows {
199199- if let Some(&existing_idx) = seen.get(&row.rkey) {
200200- // Keep the one with the more recent updated_at
201201- if row.updated_at > deduped[existing_idx].updated_at {
202202- deduped[existing_idx] = row;
203203- }
204204- } else {
205205- seen.insert(row.rkey.clone(), deduped.len());
206206- deduped.push(row);
207207- }
208208-209209- // Stop once we have enough unique entries
210210- if deduped.len() >= limit as usize {
211211- break;
212212- }
213213- }
214214-215215- Ok(deduped)
204204+ Ok(rows)
216205 }
217206218207 /// Get an entry by rkey, picking the most recent version across collaborators.
···716705 let offset = if index > 0 { index - 1 } else { 0 };
717706 let fetch_count = if index > 0 { 3u32 } else { 2u32 };
718707708708+ // Same pattern as list_notebook_entries - avoid double FINAL by using
709709+ // argMax aggregation for dedup instead
719710 let query = r#"
711711+ WITH entry_refs AS (
712712+ SELECT
713713+ entry_did,
714714+ entry_rkey,
715715+ argMax(position, indexed_at) AS position
716716+ FROM notebook_entries
717717+ WHERE notebook_did = ?
718718+ AND notebook_rkey = ?
719719+ GROUP BY entry_did, entry_rkey
720720+ ORDER BY position ASC
721721+ LIMIT ? OFFSET ?
722722+ )
720723 SELECT
721724 e.did AS did,
722725 e.rkey AS rkey,
723723- e.cid AS cid,
724724- e.uri AS uri,
725725- e.title AS title,
726726- e.path AS path,
727727- e.tags AS tags,
728728- e.author_dids AS author_dids,
729729- e.created_at AS created_at,
730730- e.updated_at AS updated_at,
731731- e.indexed_at AS indexed_at,
732732- e.record AS record
733733- FROM notebook_entries ne FINAL
734734- INNER JOIN entries e FINAL ON
735735- e.did = ne.entry_did
736736- AND e.rkey = ne.entry_rkey
737737- AND e.deleted_at = toDateTime64(0, 3)
738738- WHERE ne.notebook_did = ?
739739- AND ne.notebook_rkey = ?
740740- ORDER BY ne.position ASC
741741- LIMIT ? OFFSET ?
726726+ argMax(e.cid, e.indexed_at) AS cid,
727727+ argMax(e.uri, e.indexed_at) AS uri,
728728+ argMax(e.title, e.indexed_at) AS title,
729729+ argMax(e.path, e.indexed_at) AS path,
730730+ argMax(e.tags, e.indexed_at) AS tags,
731731+ argMax(e.author_dids, e.indexed_at) AS author_dids,
732732+ argMax(e.created_at, e.indexed_at) AS created_at,
733733+ argMax(e.updated_at, e.indexed_at) AS updated_at,
734734+ max(e.indexed_at) AS indexed_at,
735735+ argMax(e.record, e.indexed_at) AS record
736736+ FROM entries e
737737+ INNER JOIN entry_refs er ON e.did = er.entry_did AND e.rkey = er.entry_rkey
738738+ WHERE e.deleted_at = toDateTime64(0, 3)
739739+ GROUP BY e.did, e.rkey
740740+ ORDER BY any(er.position) ASC
742741 "#;
743742744743 let rows: Vec<EntryRow> = self
···11+//! Publication and document queries for site.standard.* types
22+33+use clickhouse::Row;
44+use serde::Deserialize;
55+use smol_str::SmolStr;
66+77+use crate::clickhouse::Client;
88+use crate::error::{ClickHouseError, IndexError};
99+1010+/// Publication row from the publications table.
1111+#[derive(Debug, Clone, Row, Deserialize)]
1212+pub struct PublicationRow {
1313+ pub did: SmolStr,
1414+ pub rkey: SmolStr,
1515+ pub cid: SmolStr,
1616+ pub name: SmolStr,
1717+ pub description: SmolStr,
1818+ pub url: SmolStr,
1919+ pub domain: SmolStr,
2020+ pub notebook_uri: SmolStr,
2121+ #[serde(with = "clickhouse::serde::chrono::datetime64::millis")]
2222+ pub event_time: chrono::DateTime<chrono::Utc>,
2323+ #[serde(with = "clickhouse::serde::chrono::datetime64::millis")]
2424+ pub indexed_at: chrono::DateTime<chrono::Utc>,
2525+ pub record: SmolStr,
2626+}
2727+2828+/// Custom domain lookup row from custom_domains table.
2929+#[derive(Debug, Clone, Row, Deserialize)]
3030+pub struct CustomDomainRow {
3131+ pub domain: SmolStr,
3232+ pub publication_did: SmolStr,
3333+ pub publication_rkey: SmolStr,
3434+ pub publication_name: SmolStr,
3535+ pub publication_url: SmolStr,
3636+ pub cname_target: SmolStr,
3737+ #[serde(with = "clickhouse::serde::chrono::datetime64::millis")]
3838+ pub created_at: chrono::DateTime<chrono::Utc>,
3939+}
4040+4141+/// Document row from the documents table.
4242+#[derive(Debug, Clone, Row, Deserialize)]
4343+pub struct DocumentRow {
4444+ pub did: SmolStr,
4545+ pub rkey: SmolStr,
4646+ pub cid: SmolStr,
4747+ pub publication_did: SmolStr,
4848+ pub publication_rkey: SmolStr,
4949+ pub title: SmolStr,
5050+ pub description: SmolStr,
5151+ pub path: SmolStr,
5252+ pub entry_uri: SmolStr,
5353+ pub entry_index: i64,
5454+ #[serde(with = "clickhouse::serde::chrono::datetime64::millis")]
5555+ pub published_at: chrono::DateTime<chrono::Utc>,
5656+ #[serde(with = "clickhouse::serde::chrono::datetime64::millis")]
5757+ pub indexed_at: chrono::DateTime<chrono::Utc>,
5858+ pub record: SmolStr,
5959+}
6060+6161+impl Client {
6262+ /// Lookup publication by domain (for custom domain routing).
6363+ pub async fn get_publication_by_domain(
6464+ &self,
6565+ domain: &str,
6666+ ) -> Result<Option<CustomDomainRow>, IndexError> {
6767+ let query = r#"
6868+ SELECT domain, publication_did, publication_rkey, publication_name,
6969+ publication_url, cname_target, created_at
7070+ FROM custom_domains FINAL
7171+ WHERE domain = ? AND deleted_at = toDateTime64(0, 3)
7272+ LIMIT 1
7373+ "#;
7474+ self.inner()
7575+ .query(query)
7676+ .bind(domain)
7777+ .fetch_optional::<CustomDomainRow>()
7878+ .await
7979+ .map_err(|e| ClickHouseError::Query {
8080+ message: "failed to get publication by domain".into(),
8181+ source: e,
8282+ })
8383+ .map_err(IndexError::from)
8484+ }
8585+8686+ /// Get publication by DID and rkey.
8787+ pub async fn get_publication(
8888+ &self,
8989+ did: &str,
9090+ rkey: &str,
9191+ ) -> Result<Option<PublicationRow>, IndexError> {
9292+ let query = r#"
9393+ SELECT did, rkey, cid, name, description, url, domain, notebook_uri,
9494+ event_time, indexed_at, record
9595+ FROM publications FINAL
9696+ WHERE did = ? AND rkey = ? AND deleted_at = toDateTime64(0, 3)
9797+ LIMIT 1
9898+ "#;
9999+ self.inner()
100100+ .query(query)
101101+ .bind(did)
102102+ .bind(rkey)
103103+ .fetch_optional::<PublicationRow>()
104104+ .await
105105+ .map_err(|e| ClickHouseError::Query {
106106+ message: "failed to get publication".into(),
107107+ source: e,
108108+ })
109109+ .map_err(IndexError::from)
110110+ }
111111+112112+ /// Resolve document by path within a publication.
113113+ pub async fn resolve_document_by_path(
114114+ &self,
115115+ publication_did: &str,
116116+ publication_rkey: &str,
117117+ path: &str,
118118+ ) -> Result<Option<DocumentRow>, IndexError> {
119119+ let normalized = path.to_lowercase().trim_end_matches('/').to_string();
120120+ let query = r#"
121121+ SELECT did, rkey, cid, publication_did, publication_rkey,
122122+ title, description, path, entry_uri, entry_index,
123123+ published_at, indexed_at, record
124124+ FROM documents FINAL
125125+ WHERE publication_did = ? AND publication_rkey = ?
126126+ AND path_normalized = ? AND deleted_at = toDateTime64(0, 3)
127127+ ORDER BY indexed_at DESC
128128+ LIMIT 1
129129+ "#;
130130+ self.inner()
131131+ .query(query)
132132+ .bind(publication_did)
133133+ .bind(publication_rkey)
134134+ .bind(&normalized)
135135+ .fetch_optional::<DocumentRow>()
136136+ .await
137137+ .map_err(|e| ClickHouseError::Query {
138138+ message: "failed to resolve document by path".into(),
139139+ source: e,
140140+ })
141141+ .map_err(IndexError::from)
142142+ }
143143+144144+ /// List documents in a publication.
145145+ pub async fn list_publication_documents(
146146+ &self,
147147+ publication_did: &str,
148148+ publication_rkey: &str,
149149+ limit: u32,
150150+ cursor: Option<i64>,
151151+ ) -> Result<Vec<DocumentRow>, IndexError> {
152152+ let query = if cursor.is_some() {
153153+ r#"
154154+ SELECT did, rkey, cid, publication_did, publication_rkey,
155155+ title, description, path, entry_uri, entry_index,
156156+ published_at, indexed_at, record
157157+ FROM documents FINAL
158158+ WHERE publication_did = ? AND publication_rkey = ?
159159+ AND deleted_at = toDateTime64(0, 3)
160160+ AND toUnixTimestamp64Milli(published_at) < ?
161161+ ORDER BY published_at DESC
162162+ LIMIT ?
163163+ "#
164164+ } else {
165165+ r#"
166166+ SELECT did, rkey, cid, publication_did, publication_rkey,
167167+ title, description, path, entry_uri, entry_index,
168168+ published_at, indexed_at, record
169169+ FROM documents FINAL
170170+ WHERE publication_did = ? AND publication_rkey = ?
171171+ AND deleted_at = toDateTime64(0, 3)
172172+ ORDER BY published_at DESC
173173+ LIMIT ?
174174+ "#
175175+ };
176176+177177+ let mut q = self
178178+ .inner()
179179+ .query(query)
180180+ .bind(publication_did)
181181+ .bind(publication_rkey);
182182+183183+ if let Some(c) = cursor {
184184+ q = q.bind(c);
185185+ }
186186+187187+ q.bind(limit)
188188+ .fetch_all::<DocumentRow>()
189189+ .await
190190+ .map_err(|e| ClickHouseError::Query {
191191+ message: "failed to list publication documents".into(),
192192+ source: e,
193193+ })
194194+ .map_err(IndexError::from)
195195+ }
196196+197197+ /// Get document by DID and rkey.
198198+ pub async fn get_document(
199199+ &self,
200200+ did: &str,
201201+ rkey: &str,
202202+ ) -> Result<Option<DocumentRow>, IndexError> {
203203+ let query = r#"
204204+ SELECT did, rkey, cid, publication_did, publication_rkey,
205205+ title, description, path, entry_uri, entry_index,
206206+ published_at, indexed_at, record
207207+ FROM documents FINAL
208208+ WHERE did = ? AND rkey = ? AND deleted_at = toDateTime64(0, 3)
209209+ LIMIT 1
210210+ "#;
211211+ self.inner()
212212+ .query(query)
213213+ .bind(did)
214214+ .bind(rkey)
215215+ .fetch_optional::<DocumentRow>()
216216+ .await
217217+ .map_err(|e| ClickHouseError::Query {
218218+ message: "failed to get document".into(),
219219+ source: e,
220220+ })
221221+ .map_err(IndexError::from)
222222+ }
223223+}
+255
crates/weaver-index/src/endpoints/domain.rs
···11+//! sh.weaver.domain.* endpoint handlers
22+33+use axum::{Json, extract::State};
44+use jacquard::IntoStatic;
55+use serde::{Deserialize, Serialize};
66+use jacquard::cowstr::ToCowStr;
77+use jacquard::types::string::{AtUri, Cid, Did};
88+use jacquard_axum::ExtractXrpc;
99+use weaver_api::sh_weaver::domain::{
1010+ DocumentView, PublicationView,
1111+ resolve_by_domain::{ResolveByDomainOutput, ResolveByDomainRequest},
1212+ resolve_document::{ResolveDocumentOutput, ResolveDocumentRequest},
1313+};
1414+1515+use crate::clickhouse::{DocumentRow, PublicationRow};
1616+use crate::endpoints::notebook::parse_record_json;
1717+use crate::endpoints::repo::XrpcErrorResponse;
1818+use crate::server::AppState;
1919+2020+/// Handle sh.weaver.domain.resolveByDomain
2121+///
2222+/// Resolves a publication by its custom domain.
2323+pub async fn resolve_by_domain(
2424+ State(state): State<AppState>,
2525+ ExtractXrpc(args): ExtractXrpc<ResolveByDomainRequest>,
2626+) -> Result<Json<ResolveByDomainOutput<'static>>, XrpcErrorResponse> {
2727+ let domain = args.domain.as_ref();
2828+2929+ let custom_domain = state
3030+ .clickhouse
3131+ .get_publication_by_domain(domain)
3232+ .await
3333+ .map_err(|e| {
3434+ tracing::error!("Failed to lookup domain: {}", e);
3535+ XrpcErrorResponse::internal_error("Database query failed")
3636+ })?
3737+ .ok_or_else(|| XrpcErrorResponse::not_found("Domain not found"))?;
3838+3939+ // Fetch full publication record
4040+ let pub_row = state
4141+ .clickhouse
4242+ .get_publication(
4343+ &custom_domain.publication_did,
4444+ &custom_domain.publication_rkey,
4545+ )
4646+ .await
4747+ .map_err(|e| {
4848+ tracing::error!("Failed to get publication: {}", e);
4949+ XrpcErrorResponse::internal_error("Database query failed")
5050+ })?
5151+ .ok_or_else(|| XrpcErrorResponse::not_found("Publication not found"))?;
5252+5353+ let publication = build_publication_view(&pub_row)?;
5454+5555+ Ok(Json(
5656+ ResolveByDomainOutput {
5757+ publication,
5858+ extra_data: None,
5959+ }
6060+ .into_static(),
6161+ ))
6262+}
6363+6464+/// Handle sh.weaver.domain.resolveDocument
6565+///
6666+/// Resolves a document by path within a publication.
6767+pub async fn resolve_document(
6868+ State(state): State<AppState>,
6969+ ExtractXrpc(args): ExtractXrpc<ResolveDocumentRequest>,
7070+) -> Result<Json<ResolveDocumentOutput<'static>>, XrpcErrorResponse> {
7171+ // Parse publication URI
7272+ let pub_uri = &args.publication;
7373+ let pub_authority = pub_uri.authority();
7474+ let pub_rkey = pub_uri
7575+ .rkey()
7676+ .ok_or_else(|| XrpcErrorResponse::invalid_request("Publication URI must include rkey"))?;
7777+7878+ // Resolve authority to DID
7979+ let pub_did = crate::endpoints::actor::resolve_actor(&state, pub_authority).await?;
8080+ let pub_did_str = pub_did.as_str();
8181+ let pub_rkey_str = pub_rkey.as_ref();
8282+8383+ // Verify publication exists
8484+ let _pub_row = state
8585+ .clickhouse
8686+ .get_publication(pub_did_str, pub_rkey_str)
8787+ .await
8888+ .map_err(|e| {
8989+ tracing::error!("Failed to get publication: {}", e);
9090+ XrpcErrorResponse::internal_error("Database query failed")
9191+ })?
9292+ .ok_or_else(|| XrpcErrorResponse::not_found("Publication not found"))?;
9393+9494+ // Resolve document by path
9595+ let path = args.path.as_ref();
9696+ let doc_row = state
9797+ .clickhouse
9898+ .resolve_document_by_path(pub_did_str, pub_rkey_str, path)
9999+ .await
100100+ .map_err(|e| {
101101+ tracing::error!("Failed to resolve document: {}", e);
102102+ XrpcErrorResponse::internal_error("Database query failed")
103103+ })?
104104+ .ok_or_else(|| XrpcErrorResponse::not_found("Document not found"))?;
105105+106106+ let document = build_document_view(&doc_row)?;
107107+108108+ Ok(Json(
109109+ ResolveDocumentOutput {
110110+ document,
111111+ extra_data: None,
112112+ }
113113+ .into_static(),
114114+ ))
115115+}
116116+117117+/// Build a PublicationView from a PublicationRow.
118118+fn build_publication_view(
119119+ row: &PublicationRow,
120120+) -> Result<PublicationView<'static>, XrpcErrorResponse> {
121121+ let uri_str = format!("at://{}/site.standard.publication/{}", row.did, row.rkey);
122122+ let uri = AtUri::new(&uri_str).map_err(|e| {
123123+ tracing::error!("Invalid publication URI: {}", e);
124124+ XrpcErrorResponse::internal_error("Invalid URI")
125125+ })?;
126126+127127+ let cid = Cid::new(row.cid.as_bytes()).map_err(|e| {
128128+ tracing::error!("Invalid publication CID: {}", e);
129129+ XrpcErrorResponse::internal_error("Invalid CID")
130130+ })?;
131131+132132+ let did = Did::new(&row.did).map_err(|e| {
133133+ tracing::error!("Invalid publication DID: {}", e);
134134+ XrpcErrorResponse::internal_error("Invalid DID")
135135+ })?;
136136+137137+ let record = parse_record_json(&row.record)?;
138138+139139+ let notebook_uri = if row.notebook_uri.is_empty() {
140140+ None
141141+ } else {
142142+ AtUri::new(&row.notebook_uri).ok()
143143+ };
144144+145145+ Ok(PublicationView::new()
146146+ .uri(uri.into_static())
147147+ .cid(cid.into_static())
148148+ .did(did.into_static())
149149+ .rkey(row.rkey.to_cowstr().into_static())
150150+ .name(row.name.to_cowstr().into_static())
151151+ .domain(row.domain.to_cowstr().into_static())
152152+ .record(record)
153153+ .indexed_at(row.indexed_at.fixed_offset())
154154+ .maybe_notebook_uri(notebook_uri.map(|u| u.into_static()))
155155+ .build())
156156+}
157157+158158+/// Build a DocumentView from a DocumentRow.
159159+fn build_document_view(row: &DocumentRow) -> Result<DocumentView<'static>, XrpcErrorResponse> {
160160+ let uri_str = format!("at://{}/site.standard.document/{}", row.did, row.rkey);
161161+ let uri = AtUri::new(&uri_str).map_err(|e| {
162162+ tracing::error!("Invalid document URI: {}", e);
163163+ XrpcErrorResponse::internal_error("Invalid URI")
164164+ })?;
165165+166166+ let cid = Cid::new(row.cid.as_bytes()).map_err(|e| {
167167+ tracing::error!("Invalid document CID: {}", e);
168168+ XrpcErrorResponse::internal_error("Invalid CID")
169169+ })?;
170170+171171+ let did = Did::new(&row.did).map_err(|e| {
172172+ tracing::error!("Invalid document DID: {}", e);
173173+ XrpcErrorResponse::internal_error("Invalid DID")
174174+ })?;
175175+176176+ let record = parse_record_json(&row.record)?;
177177+178178+ let entry_uri = if row.entry_uri.is_empty() {
179179+ None
180180+ } else {
181181+ AtUri::new(&row.entry_uri).ok()
182182+ };
183183+184184+ let entry_index = if row.entry_index >= 0 {
185185+ Some(row.entry_index)
186186+ } else {
187187+ None
188188+ };
189189+190190+ Ok(DocumentView::new()
191191+ .uri(uri.into_static())
192192+ .cid(cid.into_static())
193193+ .did(did.into_static())
194194+ .rkey(row.rkey.to_cowstr().into_static())
195195+ .title(row.title.to_cowstr().into_static())
196196+ .path(row.path.to_cowstr().into_static())
197197+ .record(record)
198198+ .indexed_at(row.indexed_at.fixed_offset())
199199+ .maybe_entry_uri(entry_uri.map(|u| u.into_static()))
200200+ .maybe_entry_index(entry_index)
201201+ .build())
202202+}
203203+204204+// === Internal Caddy Verification Endpoint ===
205205+206206+#[derive(Debug, Deserialize)]
207207+pub struct VerifyDomainQuery {
208208+ pub domain: String,
209209+}
210210+211211+#[derive(Debug, Serialize)]
212212+#[serde(rename_all = "camelCase")]
213213+pub struct VerifyDomainResponse {
214214+ pub valid: bool,
215215+ pub publication_uri: Option<String>,
216216+}
217217+218218+/// Internal endpoint for Caddy on-demand TLS verification.
219219+pub async fn verify_domain(
220220+ State(state): State<AppState>,
221221+ axum::extract::Query(params): axum::extract::Query<VerifyDomainQuery>,
222222+) -> Result<Json<VerifyDomainResponse>, XrpcErrorResponse> {
223223+ let domain = ¶ms.domain;
224224+ tracing::info!(%domain, "Verifying custom domain for TLS");
225225+226226+ let row = state
227227+ .clickhouse
228228+ .get_publication_by_domain(domain)
229229+ .await
230230+ .map_err(|e| {
231231+ tracing::error!(%domain, error = %e, "Database error");
232232+ XrpcErrorResponse::internal_error("Database query failed")
233233+ })?;
234234+235235+ match row {
236236+ Some(r) => {
237237+ let uri = format!(
238238+ "at://{}/site.standard.publication/{}",
239239+ r.publication_did, r.publication_rkey
240240+ );
241241+ tracing::info!(%domain, %uri, "Domain verified");
242242+ Ok(Json(VerifyDomainResponse {
243243+ valid: true,
244244+ publication_uri: Some(uri),
245245+ }))
246246+ }
247247+ None => {
248248+ tracing::info!(%domain, "Domain not found");
249249+ Ok(Json(VerifyDomainResponse {
250250+ valid: false,
251251+ publication_uri: None,
252252+ }))
253253+ }
254254+ }
255255+}
+1
crates/weaver-index/src/endpoints/mod.rs
···1414pub mod actor;
1515pub mod bsky;
1616pub mod collab;
1717+pub mod domain;
1718pub mod edit;
1819pub mod identity;
1920pub mod notebook;
+34-34
crates/weaver-index/src/endpoints/notebook.rs
···192192 // Build BookEntryViews with prev/next navigation
193193 let mut entries: Vec<BookEntryView<'static>> = Vec::with_capacity(entry_views.len());
194194 for (idx, entry_view) in entry_views.iter().enumerate() {
195195- let prev = (idx > 0)
196196- .then(|| BookEntryRef::new().entry(entry_views[idx - 1].clone()).build());
195195+ let prev = (idx > 0).then(|| {
196196+ BookEntryRef::new()
197197+ .entry(entry_views[idx - 1].clone())
198198+ .build()
199199+ });
197200 let next = entry_views
198201 .get(idx + 1)
199202 .map(|e| BookEntryRef::new().entry(e.clone()).build());
···362365 let did_str = did.as_str();
363366364367 // Fetch entry and contributors in parallel
365365- let (entry_result, contributors_result) = tokio::try_join!(
366366- async {
367367- state
368368- .clickhouse
369369- .get_entry_exact(did_str, rkey_str)
370370- .await
371371- .map_err(|e| {
372372- tracing::error!("Failed to get entry: {}", e);
373373- XrpcErrorResponse::internal_error("Database query failed")
374374- })
375375- },
376376- async {
377377- state
378378- .clickhouse
379379- .get_entry_contributors(did_str, rkey_str)
380380- .await
381381- .map_err(|e| {
382382- tracing::error!("Failed to get contributors: {}", e);
383383- XrpcErrorResponse::internal_error("Database query failed")
384384- })
385385- }
386386- )?;
387387-388388- let entry_row = entry_result.ok_or_else(|| XrpcErrorResponse::not_found("Entry not found"))?;
389389-368368+ let contributors_result = state
369369+ .clickhouse
370370+ .get_entry_contributors(did_str, rkey_str)
371371+ .await
372372+ .map_err(|e| {
373373+ tracing::error!("Failed to get contributors: {}", e);
374374+ XrpcErrorResponse::internal_error("Database query failed")
375375+ })?;
390376 // Merge contributors with author_dids from record (dedupe)
391377 let mut all_author_dids: HashSet<&str> =
392378 contributors_result.iter().map(|s| s.as_str()).collect();
379379+380380+ let entry_result = state
381381+ .clickhouse
382382+ .get_entry(
383383+ rkey_str,
384384+ &all_author_dids.iter().cloned().collect::<Vec<_>>(),
385385+ )
386386+ .await
387387+ .map_err(|e| {
388388+ tracing::error!("Failed to get entry: {}", e);
389389+ XrpcErrorResponse::internal_error("Database query failed")
390390+ })?;
391391+ let entry_row = entry_result.ok_or_else(|| XrpcErrorResponse::not_found("Entry not found"))?;
392392+393393 for did in &entry_row.author_dids {
394394 all_author_dids.insert(did.as_str());
395395 }
···532532}
533533534534/// Build an EntryView from an EntryRow with explicit author list (evidence-based contributors)
535535-fn build_entry_view_with_authors(
535535+pub fn build_entry_view_with_authors(
536536 entry_row: &crate::clickhouse::EntryRow,
537537 author_dids: &[SmolStr],
538538 profile_map: &HashMap<&str, &ProfileRow>,
···564564}
565565566566/// Convert SmolStr to Option<CowStr> if non-empty
567567-fn non_empty_cowstr(s: &smol_str::SmolStr) -> Option<jacquard::CowStr<'static>> {
567567+pub fn non_empty_cowstr(s: &smol_str::SmolStr) -> Option<jacquard::CowStr<'static>> {
568568 if s.is_empty() {
569569 None
570570 } else {
···573573}
574574575575/// Parse record JSON string into owned Data
576576-fn parse_record_json(json: &str) -> Result<Data<'static>, XrpcErrorResponse> {
576576+pub fn parse_record_json(json: &str) -> Result<Data<'static>, XrpcErrorResponse> {
577577 let data: Data<'_> = serde_json::from_str(json).map_err(|e| {
578578 tracing::error!("Failed to parse record JSON: {}", e);
579579 XrpcErrorResponse::internal_error("Invalid record JSON stored")
···582582}
583583584584/// Hydrate author list from DIDs using profile map
585585-fn hydrate_authors(
585585+pub fn hydrate_authors(
586586 author_dids: &[SmolStr],
587587 profile_map: &HashMap<&str, &ProfileRow>,
588588) -> Result<Vec<AuthorListView<'static>>, XrpcErrorResponse> {
···623623}
624624625625/// Convert ProfileRow to ProfileDataView
626626-fn profile_to_data_view(
626626+pub fn profile_to_data_view(
627627 profile: &ProfileRow,
628628) -> Result<ProfileDataView<'static>, XrpcErrorResponse> {
629629 let did = Did::new(&profile.did).map_err(|e| {
···680680}
681681682682/// Parse cursor string to i64 timestamp millis
683683-fn parse_cursor(cursor: Option<&str>) -> Result<Option<i64>, XrpcErrorResponse> {
683683+pub fn parse_cursor(cursor: Option<&str>) -> Result<Option<i64>, XrpcErrorResponse> {
684684 cursor
685685 .map(|c| {
686686 c.parse::<i64>()
···10111011}
1012101210131013/// Build an EntryView from an EntryRow
10141014-fn build_entry_view(
10141014+pub fn build_entry_view(
10151015 entry_row: &EntryRow,
10161016 profile_map: &HashMap<&str, &ProfileRow>,
10171017) -> Result<EntryView<'static>, XrpcErrorResponse> {
+1-1
crates/weaver-index/src/landing.html
···116116 <p>This is an AT Protocol record index serving the Weaver writing platform.</p>
117117 <p>Most API endpoints are available under <code>/xrpc/</code>.</p>
118118 <ul>
119119- <li>Web App (alpha): <a href="https://alpha.weaver.sh">alpha.weaver.sh</a></li>
119119+ <li>Web App: <a href="https://weaver.sh">weaver.sh</a></li>
120120 <li>
121121 Source Code:
122122 <a href="https://tangled.org/@nonbinary.computer/weaver">tangled.org/@nonbinary.computer/weaver</a>