A better Rust ATProto crate
0

Configure Feed

Select the types of activity you want to include in your feed.

fixed a couple small oversights in the revised generation

author nonbinary.computer date (May 21, 2026, 7:22 PM -0400) commit 9043245a parent af47f4bc change-id vzytzxtx
+278 -278
+19 -19
crates/jacquard-codegen-tests/src/generated/macro_mode/app_bsky/embed/external.rs
··· 232 232 } 233 233 /// State trait tracking which required fields have been set 234 234 pub trait State: sealed::Sealed { 235 - type Uri; 236 235 type Description; 236 + type Uri; 237 237 type Title; 238 238 } 239 239 /// Empty state - all required fields are unset 240 240 pub struct Empty(()); 241 241 impl sealed::Sealed for Empty {} 242 242 impl State for Empty { 243 + type Description = Unset; 243 244 type Uri = Unset; 244 - type Description = Unset; 245 245 type Title = Unset; 246 246 } 247 - ///State transition - sets the `uri` field to Set 248 - pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>); 249 - impl<St: State> sealed::Sealed for SetUri<St> {} 250 - impl<St: State> State for SetUri<St> { 251 - type Uri = Set<members::uri>; 252 - type Description = St::Description; 253 - type Title = St::Title; 254 - } 255 247 ///State transition - sets the `description` field to Set 256 248 pub struct SetDescription<St: State = Empty>(PhantomData<fn() -> St>); 257 249 impl<St: State> sealed::Sealed for SetDescription<St> {} 258 250 impl<St: State> State for SetDescription<St> { 251 + type Description = Set<members::description>; 259 252 type Uri = St::Uri; 260 - type Description = Set<members::description>; 253 + type Title = St::Title; 254 + } 255 + ///State transition - sets the `uri` field to Set 256 + pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>); 257 + impl<St: State> sealed::Sealed for SetUri<St> {} 258 + impl<St: State> State for SetUri<St> { 259 + type Description = St::Description; 260 + type Uri = Set<members::uri>; 261 261 type Title = St::Title; 262 262 } 263 263 ///State transition - sets the `title` field to Set 264 264 pub struct SetTitle<St: State = Empty>(PhantomData<fn() -> St>); 265 265 impl<St: State> sealed::Sealed for SetTitle<St> {} 266 266 impl<St: State> State for SetTitle<St> { 267 - type Uri = St::Uri; 268 267 type Description = St::Description; 268 + type Uri = St::Uri; 269 269 type Title = Set<members::title>; 270 270 } 271 271 /// Marker types for field names 272 272 #[allow(non_camel_case_types)] 273 273 pub mod members { 274 + ///Marker type for the `description` field 275 + pub struct description(()); 274 276 ///Marker type for the `uri` field 275 277 pub struct uri(()); 276 - ///Marker type for the `description` field 277 - pub struct description(()); 278 278 ///Marker type for the `title` field 279 279 pub struct title(()); 280 280 } ··· 295 295 _type: ::core::marker::PhantomData<fn() -> S>, 296 296 } 297 297 298 - impl External<DefaultStr> { 298 + impl External<jacquard_common::DefaultStr> { 299 299 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 300 300 pub fn new() -> ExternalBuilder<external_state::Empty, jacquard_common::DefaultStr> { 301 301 ExternalBuilder::new() ··· 410 410 impl<St, S: jacquard_common::BosStr> ExternalBuilder<St, S> 411 411 where 412 412 St: external_state::State, 413 - St::Uri: external_state::IsSet, 414 413 St::Description: external_state::IsSet, 414 + St::Uri: external_state::IsSet, 415 415 St::Title: external_state::IsSet, 416 416 { 417 417 /// Build the final struct. ··· 666 666 _type: ::core::marker::PhantomData<fn() -> S>, 667 667 } 668 668 669 - impl ExternalRecord<DefaultStr> { 669 + impl ExternalRecord<jacquard_common::DefaultStr> { 670 670 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 671 671 pub fn new() -> ExternalRecordBuilder< 672 672 external_record_state::Empty, ··· 797 797 _type: ::core::marker::PhantomData<fn() -> S>, 798 798 } 799 799 800 - impl View<DefaultStr> { 800 + impl View<jacquard_common::DefaultStr> { 801 801 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 802 802 pub fn new() -> ViewBuilder<view_state::Empty, jacquard_common::DefaultStr> { 803 803 ViewBuilder::new() ··· 952 952 _type: ::core::marker::PhantomData<fn() -> S>, 953 953 } 954 954 955 - impl ViewExternal<DefaultStr> { 955 + impl ViewExternal<jacquard_common::DefaultStr> { 956 956 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 957 957 pub fn new() -> ViewExternalBuilder< 958 958 view_external_state::Empty,
+17 -17
crates/jacquard-codegen-tests/src/generated/macro_mode/app_bsky/richtext/facet.rs
··· 310 310 } 311 311 /// State trait tracking which required fields have been set 312 312 pub trait State: sealed::Sealed { 313 - type ByteStart; 314 313 type ByteEnd; 314 + type ByteStart; 315 315 } 316 316 /// Empty state - all required fields are unset 317 317 pub struct Empty(()); 318 318 impl sealed::Sealed for Empty {} 319 319 impl State for Empty { 320 + type ByteEnd = Unset; 320 321 type ByteStart = Unset; 321 - type ByteEnd = Unset; 322 - } 323 - ///State transition - sets the `byte_start` field to Set 324 - pub struct SetByteStart<St: State = Empty>(PhantomData<fn() -> St>); 325 - impl<St: State> sealed::Sealed for SetByteStart<St> {} 326 - impl<St: State> State for SetByteStart<St> { 327 - type ByteStart = Set<members::byte_start>; 328 - type ByteEnd = St::ByteEnd; 329 322 } 330 323 ///State transition - sets the `byte_end` field to Set 331 324 pub struct SetByteEnd<St: State = Empty>(PhantomData<fn() -> St>); 332 325 impl<St: State> sealed::Sealed for SetByteEnd<St> {} 333 326 impl<St: State> State for SetByteEnd<St> { 334 - type ByteStart = St::ByteStart; 335 327 type ByteEnd = Set<members::byte_end>; 328 + type ByteStart = St::ByteStart; 329 + } 330 + ///State transition - sets the `byte_start` field to Set 331 + pub struct SetByteStart<St: State = Empty>(PhantomData<fn() -> St>); 332 + impl<St: State> sealed::Sealed for SetByteStart<St> {} 333 + impl<St: State> State for SetByteStart<St> { 334 + type ByteEnd = St::ByteEnd; 335 + type ByteStart = Set<members::byte_start>; 336 336 } 337 337 /// Marker types for field names 338 338 #[allow(non_camel_case_types)] 339 339 pub mod members { 340 + ///Marker type for the `byte_end` field 341 + pub struct byte_end(()); 340 342 ///Marker type for the `byte_start` field 341 343 pub struct byte_start(()); 342 - ///Marker type for the `byte_end` field 343 - pub struct byte_end(()); 344 344 } 345 345 } 346 346 ··· 354 354 _type: ::core::marker::PhantomData<fn() -> S>, 355 355 } 356 356 357 - impl ByteSlice<DefaultStr> { 357 + impl ByteSlice<jacquard_common::DefaultStr> { 358 358 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 359 359 pub fn new() -> ByteSliceBuilder< 360 360 byte_slice_state::Empty, ··· 434 434 impl<St, S: jacquard_common::BosStr> ByteSliceBuilder<St, S> 435 435 where 436 436 St: byte_slice_state::State, 437 - St::ByteStart: byte_slice_state::IsSet, 438 437 St::ByteEnd: byte_slice_state::IsSet, 438 + St::ByteStart: byte_slice_state::IsSet, 439 439 { 440 440 /// Build the final struct. 441 441 pub fn build(self) -> ByteSlice<S> { ··· 699 699 _type: ::core::marker::PhantomData<fn() -> S>, 700 700 } 701 701 702 - impl Link<DefaultStr> { 702 + impl Link<jacquard_common::DefaultStr> { 703 703 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 704 704 pub fn new() -> LinkBuilder<link_state::Empty, jacquard_common::DefaultStr> { 705 705 LinkBuilder::new() ··· 838 838 _type: ::core::marker::PhantomData<fn() -> S>, 839 839 } 840 840 841 - impl Facet<DefaultStr> { 841 + impl Facet<jacquard_common::DefaultStr> { 842 842 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 843 843 pub fn new() -> FacetBuilder<facet_state::Empty, jacquard_common::DefaultStr> { 844 844 FacetBuilder::new() ··· 984 984 _type: ::core::marker::PhantomData<fn() -> S>, 985 985 } 986 986 987 - impl Mention<DefaultStr> { 987 + impl Mention<jacquard_common::DefaultStr> { 988 988 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 989 989 pub fn new() -> MentionBuilder<mention_state::Empty, jacquard_common::DefaultStr> { 990 990 MentionBuilder::new()
+65 -65
crates/jacquard-codegen-tests/src/generated/macro_mode/com_atproto/label.rs
··· 798 798 /// State trait tracking which required fields have been set 799 799 pub trait State: sealed::Sealed { 800 800 type Uri; 801 - type Val; 802 801 type Src; 803 802 type Cts; 803 + type Val; 804 804 } 805 805 /// Empty state - all required fields are unset 806 806 pub struct Empty(()); 807 807 impl sealed::Sealed for Empty {} 808 808 impl State for Empty { 809 809 type Uri = Unset; 810 - type Val = Unset; 811 810 type Src = Unset; 812 811 type Cts = Unset; 812 + type Val = Unset; 813 813 } 814 814 ///State transition - sets the `uri` field to Set 815 815 pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>); 816 816 impl<St: State> sealed::Sealed for SetUri<St> {} 817 817 impl<St: State> State for SetUri<St> { 818 818 type Uri = Set<members::uri>; 819 - type Val = St::Val; 820 819 type Src = St::Src; 821 820 type Cts = St::Cts; 822 - } 823 - ///State transition - sets the `val` field to Set 824 - pub struct SetVal<St: State = Empty>(PhantomData<fn() -> St>); 825 - impl<St: State> sealed::Sealed for SetVal<St> {} 826 - impl<St: State> State for SetVal<St> { 827 - type Uri = St::Uri; 828 - type Val = Set<members::val>; 829 - type Src = St::Src; 830 - type Cts = St::Cts; 821 + type Val = St::Val; 831 822 } 832 823 ///State transition - sets the `src` field to Set 833 824 pub struct SetSrc<St: State = Empty>(PhantomData<fn() -> St>); 834 825 impl<St: State> sealed::Sealed for SetSrc<St> {} 835 826 impl<St: State> State for SetSrc<St> { 836 827 type Uri = St::Uri; 837 - type Val = St::Val; 838 828 type Src = Set<members::src>; 839 829 type Cts = St::Cts; 830 + type Val = St::Val; 840 831 } 841 832 ///State transition - sets the `cts` field to Set 842 833 pub struct SetCts<St: State = Empty>(PhantomData<fn() -> St>); 843 834 impl<St: State> sealed::Sealed for SetCts<St> {} 844 835 impl<St: State> State for SetCts<St> { 845 836 type Uri = St::Uri; 837 + type Src = St::Src; 838 + type Cts = Set<members::cts>; 846 839 type Val = St::Val; 840 + } 841 + ///State transition - sets the `val` field to Set 842 + pub struct SetVal<St: State = Empty>(PhantomData<fn() -> St>); 843 + impl<St: State> sealed::Sealed for SetVal<St> {} 844 + impl<St: State> State for SetVal<St> { 845 + type Uri = St::Uri; 847 846 type Src = St::Src; 848 - type Cts = Set<members::cts>; 847 + type Cts = St::Cts; 848 + type Val = Set<members::val>; 849 849 } 850 850 /// Marker types for field names 851 851 #[allow(non_camel_case_types)] 852 852 pub mod members { 853 853 ///Marker type for the `uri` field 854 854 pub struct uri(()); 855 - ///Marker type for the `val` field 856 - pub struct val(()); 857 855 ///Marker type for the `src` field 858 856 pub struct src(()); 859 857 ///Marker type for the `cts` field 860 858 pub struct cts(()); 859 + ///Marker type for the `val` field 860 + pub struct val(()); 861 861 } 862 862 } 863 863 ··· 881 881 _type: ::core::marker::PhantomData<fn() -> S>, 882 882 } 883 883 884 - impl Label<DefaultStr> { 884 + impl Label<jacquard_common::DefaultStr> { 885 885 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 886 886 pub fn new() -> LabelBuilder<label_state::Empty, jacquard_common::DefaultStr> { 887 887 LabelBuilder::new() ··· 1080 1080 where 1081 1081 St: label_state::State, 1082 1082 St::Uri: label_state::IsSet, 1083 - St::Val: label_state::IsSet, 1084 1083 St::Src: label_state::IsSet, 1085 1084 St::Cts: label_state::IsSet, 1085 + St::Val: label_state::IsSet, 1086 1086 { 1087 1087 /// Build the final struct. 1088 1088 pub fn build(self) -> Label<S> { ··· 1536 1536 } 1537 1537 /// State trait tracking which required fields have been set 1538 1538 pub trait State: sealed::Sealed { 1539 - type Severity; 1540 1539 type Locales; 1541 - type Blurs; 1540 + type Severity; 1542 1541 type Identifier; 1542 + type Blurs; 1543 1543 } 1544 1544 /// Empty state - all required fields are unset 1545 1545 pub struct Empty(()); 1546 1546 impl sealed::Sealed for Empty {} 1547 1547 impl State for Empty { 1548 - type Severity = Unset; 1549 1548 type Locales = Unset; 1550 - type Blurs = Unset; 1549 + type Severity = Unset; 1551 1550 type Identifier = Unset; 1552 - } 1553 - ///State transition - sets the `severity` field to Set 1554 - pub struct SetSeverity<St: State = Empty>(PhantomData<fn() -> St>); 1555 - impl<St: State> sealed::Sealed for SetSeverity<St> {} 1556 - impl<St: State> State for SetSeverity<St> { 1557 - type Severity = Set<members::severity>; 1558 - type Locales = St::Locales; 1559 - type Blurs = St::Blurs; 1560 - type Identifier = St::Identifier; 1551 + type Blurs = Unset; 1561 1552 } 1562 1553 ///State transition - sets the `locales` field to Set 1563 1554 pub struct SetLocales<St: State = Empty>(PhantomData<fn() -> St>); 1564 1555 impl<St: State> sealed::Sealed for SetLocales<St> {} 1565 1556 impl<St: State> State for SetLocales<St> { 1557 + type Locales = Set<members::locales>; 1566 1558 type Severity = St::Severity; 1567 - type Locales = Set<members::locales>; 1559 + type Identifier = St::Identifier; 1568 1560 type Blurs = St::Blurs; 1569 - type Identifier = St::Identifier; 1570 1561 } 1571 - ///State transition - sets the `blurs` field to Set 1572 - pub struct SetBlurs<St: State = Empty>(PhantomData<fn() -> St>); 1573 - impl<St: State> sealed::Sealed for SetBlurs<St> {} 1574 - impl<St: State> State for SetBlurs<St> { 1575 - type Severity = St::Severity; 1562 + ///State transition - sets the `severity` field to Set 1563 + pub struct SetSeverity<St: State = Empty>(PhantomData<fn() -> St>); 1564 + impl<St: State> sealed::Sealed for SetSeverity<St> {} 1565 + impl<St: State> State for SetSeverity<St> { 1576 1566 type Locales = St::Locales; 1577 - type Blurs = Set<members::blurs>; 1567 + type Severity = Set<members::severity>; 1578 1568 type Identifier = St::Identifier; 1569 + type Blurs = St::Blurs; 1579 1570 } 1580 1571 ///State transition - sets the `identifier` field to Set 1581 1572 pub struct SetIdentifier<St: State = Empty>(PhantomData<fn() -> St>); 1582 1573 impl<St: State> sealed::Sealed for SetIdentifier<St> {} 1583 1574 impl<St: State> State for SetIdentifier<St> { 1575 + type Locales = St::Locales; 1584 1576 type Severity = St::Severity; 1577 + type Identifier = Set<members::identifier>; 1578 + type Blurs = St::Blurs; 1579 + } 1580 + ///State transition - sets the `blurs` field to Set 1581 + pub struct SetBlurs<St: State = Empty>(PhantomData<fn() -> St>); 1582 + impl<St: State> sealed::Sealed for SetBlurs<St> {} 1583 + impl<St: State> State for SetBlurs<St> { 1585 1584 type Locales = St::Locales; 1586 - type Blurs = St::Blurs; 1587 - type Identifier = Set<members::identifier>; 1585 + type Severity = St::Severity; 1586 + type Identifier = St::Identifier; 1587 + type Blurs = Set<members::blurs>; 1588 1588 } 1589 1589 /// Marker types for field names 1590 1590 #[allow(non_camel_case_types)] 1591 1591 pub mod members { 1592 + ///Marker type for the `locales` field 1593 + pub struct locales(()); 1592 1594 ///Marker type for the `severity` field 1593 1595 pub struct severity(()); 1594 - ///Marker type for the `locales` field 1595 - pub struct locales(()); 1596 + ///Marker type for the `identifier` field 1597 + pub struct identifier(()); 1596 1598 ///Marker type for the `blurs` field 1597 1599 pub struct blurs(()); 1598 - ///Marker type for the `identifier` field 1599 - pub struct identifier(()); 1600 1600 } 1601 1601 } 1602 1602 ··· 1619 1619 _type: ::core::marker::PhantomData<fn() -> S>, 1620 1620 } 1621 1621 1622 - impl LabelValueDefinition<DefaultStr> { 1622 + impl LabelValueDefinition<jacquard_common::DefaultStr> { 1623 1623 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 1624 1624 pub fn new() -> LabelValueDefinitionBuilder< 1625 1625 label_value_definition_state::Empty, ··· 1788 1788 impl<St, S: jacquard_common::BosStr> LabelValueDefinitionBuilder<St, S> 1789 1789 where 1790 1790 St: label_value_definition_state::State, 1791 - St::Severity: label_value_definition_state::IsSet, 1792 1791 St::Locales: label_value_definition_state::IsSet, 1793 - St::Blurs: label_value_definition_state::IsSet, 1792 + St::Severity: label_value_definition_state::IsSet, 1794 1793 St::Identifier: label_value_definition_state::IsSet, 1794 + St::Blurs: label_value_definition_state::IsSet, 1795 1795 { 1796 1796 /// Build the final struct. 1797 1797 pub fn build(self) -> LabelValueDefinition<S> { ··· 1835 1835 } 1836 1836 /// State trait tracking which required fields have been set 1837 1837 pub trait State: sealed::Sealed { 1838 + type Description; 1838 1839 type Lang; 1839 1840 type Name; 1840 - type Description; 1841 1841 } 1842 1842 /// Empty state - all required fields are unset 1843 1843 pub struct Empty(()); 1844 1844 impl sealed::Sealed for Empty {} 1845 1845 impl State for Empty { 1846 + type Description = Unset; 1846 1847 type Lang = Unset; 1847 1848 type Name = Unset; 1848 - type Description = Unset; 1849 + } 1850 + ///State transition - sets the `description` field to Set 1851 + pub struct SetDescription<St: State = Empty>(PhantomData<fn() -> St>); 1852 + impl<St: State> sealed::Sealed for SetDescription<St> {} 1853 + impl<St: State> State for SetDescription<St> { 1854 + type Description = Set<members::description>; 1855 + type Lang = St::Lang; 1856 + type Name = St::Name; 1849 1857 } 1850 1858 ///State transition - sets the `lang` field to Set 1851 1859 pub struct SetLang<St: State = Empty>(PhantomData<fn() -> St>); 1852 1860 impl<St: State> sealed::Sealed for SetLang<St> {} 1853 1861 impl<St: State> State for SetLang<St> { 1862 + type Description = St::Description; 1854 1863 type Lang = Set<members::lang>; 1855 1864 type Name = St::Name; 1856 - type Description = St::Description; 1857 1865 } 1858 1866 ///State transition - sets the `name` field to Set 1859 1867 pub struct SetName<St: State = Empty>(PhantomData<fn() -> St>); 1860 1868 impl<St: State> sealed::Sealed for SetName<St> {} 1861 1869 impl<St: State> State for SetName<St> { 1862 - type Lang = St::Lang; 1863 - type Name = Set<members::name>; 1864 1870 type Description = St::Description; 1865 - } 1866 - ///State transition - sets the `description` field to Set 1867 - pub struct SetDescription<St: State = Empty>(PhantomData<fn() -> St>); 1868 - impl<St: State> sealed::Sealed for SetDescription<St> {} 1869 - impl<St: State> State for SetDescription<St> { 1870 1871 type Lang = St::Lang; 1871 - type Name = St::Name; 1872 - type Description = Set<members::description>; 1872 + type Name = Set<members::name>; 1873 1873 } 1874 1874 /// Marker types for field names 1875 1875 #[allow(non_camel_case_types)] 1876 1876 pub mod members { 1877 + ///Marker type for the `description` field 1878 + pub struct description(()); 1877 1879 ///Marker type for the `lang` field 1878 1880 pub struct lang(()); 1879 1881 ///Marker type for the `name` field 1880 1882 pub struct name(()); 1881 - ///Marker type for the `description` field 1882 - pub struct description(()); 1883 1883 } 1884 1884 } 1885 1885 ··· 1897 1897 _type: ::core::marker::PhantomData<fn() -> S>, 1898 1898 } 1899 1899 1900 - impl LabelValueDefinitionStrings<DefaultStr> { 1900 + impl LabelValueDefinitionStrings<jacquard_common::DefaultStr> { 1901 1901 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 1902 1902 pub fn new() -> LabelValueDefinitionStringsBuilder< 1903 1903 label_value_definition_strings_state::Empty, ··· 2013 2013 impl<St, S: jacquard_common::BosStr> LabelValueDefinitionStringsBuilder<St, S> 2014 2014 where 2015 2015 St: label_value_definition_strings_state::State, 2016 + St::Description: label_value_definition_strings_state::IsSet, 2016 2017 St::Lang: label_value_definition_strings_state::IsSet, 2017 2018 St::Name: label_value_definition_strings_state::IsSet, 2018 - St::Description: label_value_definition_strings_state::IsSet, 2019 2019 { 2020 2020 /// Build the final struct. 2021 2021 pub fn build(self) -> LabelValueDefinitionStrings<S> { ··· 2087 2087 _type: ::core::marker::PhantomData<fn() -> S>, 2088 2088 } 2089 2089 2090 - impl SelfLabels<DefaultStr> { 2090 + impl SelfLabels<jacquard_common::DefaultStr> { 2091 2091 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 2092 2092 pub fn new() -> SelfLabelsBuilder< 2093 2093 self_labels_state::Empty,
+1 -1
crates/jacquard-codegen-tests/src/generated/macro_mode/com_atproto/repo/strong_ref.rs
··· 104 104 _type: ::core::marker::PhantomData<fn() -> S>, 105 105 } 106 106 107 - impl StrongRef<DefaultStr> { 107 + impl StrongRef<jacquard_common::DefaultStr> { 108 108 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 109 109 pub fn new() -> StrongRefBuilder< 110 110 strong_ref_state::Empty,
+1 -1
crates/jacquard-codegen-tests/src/generated/macro_mode/test_collision/collection.rs
··· 371 371 _type: ::core::marker::PhantomData<fn() -> S>, 372 372 } 373 373 374 - impl CollectionRecord<DefaultStr> { 374 + impl CollectionRecord<jacquard_common::DefaultStr> { 375 375 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 376 376 pub fn new() -> CollectionRecordBuilder< 377 377 collection_record_state::Empty,
+14 -14
crates/jacquard-codegen-tests/src/generated/macro_mode/test_collision/did.rs
··· 264 264 } 265 265 /// State trait tracking which required fields have been set 266 266 pub trait State: sealed::Sealed { 267 - type Owner; 268 267 type Identifier; 268 + type Owner; 269 269 } 270 270 /// Empty state - all required fields are unset 271 271 pub struct Empty(()); 272 272 impl sealed::Sealed for Empty {} 273 273 impl State for Empty { 274 - type Owner = Unset; 275 274 type Identifier = Unset; 276 - } 277 - ///State transition - sets the `owner` field to Set 278 - pub struct SetOwner<St: State = Empty>(PhantomData<fn() -> St>); 279 - impl<St: State> sealed::Sealed for SetOwner<St> {} 280 - impl<St: State> State for SetOwner<St> { 281 - type Owner = Set<members::owner>; 282 - type Identifier = St::Identifier; 275 + type Owner = Unset; 283 276 } 284 277 ///State transition - sets the `identifier` field to Set 285 278 pub struct SetIdentifier<St: State = Empty>(PhantomData<fn() -> St>); 286 279 impl<St: State> sealed::Sealed for SetIdentifier<St> {} 287 280 impl<St: State> State for SetIdentifier<St> { 288 - type Owner = St::Owner; 289 281 type Identifier = Set<members::identifier>; 282 + type Owner = St::Owner; 283 + } 284 + ///State transition - sets the `owner` field to Set 285 + pub struct SetOwner<St: State = Empty>(PhantomData<fn() -> St>); 286 + impl<St: State> sealed::Sealed for SetOwner<St> {} 287 + impl<St: State> State for SetOwner<St> { 288 + type Identifier = St::Identifier; 289 + type Owner = Set<members::owner>; 290 290 } 291 291 /// Marker types for field names 292 292 #[allow(non_camel_case_types)] 293 293 pub mod members { 294 + ///Marker type for the `identifier` field 295 + pub struct identifier(()); 294 296 ///Marker type for the `owner` field 295 297 pub struct owner(()); 296 - ///Marker type for the `identifier` field 297 - pub struct identifier(()); 298 298 } 299 299 } 300 300 ··· 312 312 _type: ::core::marker::PhantomData<fn() -> S>, 313 313 } 314 314 315 - impl DidRecord<DefaultStr> { 315 + impl DidRecord<jacquard_common::DefaultStr> { 316 316 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 317 317 pub fn new() -> DidRecordBuilder< 318 318 did_record_state::Empty, ··· 405 405 impl<St, S: jacquard_common::BosStr> DidRecordBuilder<St, S> 406 406 where 407 407 St: did_record_state::State, 408 - St::Owner: did_record_state::IsSet, 409 408 St::Identifier: did_record_state::IsSet, 409 + St::Owner: did_record_state::IsSet, 410 410 { 411 411 /// Build the final struct. 412 412 pub fn build(self) -> DidRecord<S> {
+1 -1
crates/jacquard-codegen-tests/src/generated/macro_mode/test_collision/option.rs
··· 180 180 _type: ::core::marker::PhantomData<fn() -> S>, 181 181 } 182 182 183 - impl OptionRecord<DefaultStr> { 183 + impl OptionRecord<jacquard_common::DefaultStr> { 184 184 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 185 185 pub fn new() -> OptionRecordBuilder< 186 186 option_record_state::Empty,
+1 -1
crates/jacquard-codegen-tests/src/generated/macro_mode/test_ns2/consumer.rs
··· 110 110 _type: ::core::marker::PhantomData<fn() -> S>, 111 111 } 112 112 113 - impl Consumer<DefaultStr> { 113 + impl Consumer<jacquard_common::DefaultStr> { 114 114 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 115 115 pub fn new() -> ConsumerBuilder<consumer_state::Empty, jacquard_common::DefaultStr> { 116 116 ConsumerBuilder::new()
+2 -2
crates/jacquard-codegen-tests/src/generated/macro_mode/test_ns3/collision.rs
··· 149 149 _type: ::core::marker::PhantomData<fn() -> S>, 150 150 } 151 151 152 - impl Foo<DefaultStr> { 152 + impl Foo<jacquard_common::DefaultStr> { 153 153 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 154 154 pub fn new() -> FooBuilder<foo_state::Empty, jacquard_common::DefaultStr> { 155 155 FooBuilder::new() ··· 404 404 _type: ::core::marker::PhantomData<fn() -> S>, 405 405 } 406 406 407 - impl Collision<DefaultStr> { 407 + impl Collision<jacquard_common::DefaultStr> { 408 408 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 409 409 pub fn new() -> CollisionBuilder< 410 410 collision_state::Empty,
+30 -30
crates/jacquard-codegen-tests/src/generated/pretty/app_bsky/embed/external.rs
··· 179 179 } 180 180 /// State trait tracking which required fields have been set 181 181 pub trait State: sealed::Sealed { 182 + type Description; 182 183 type Title; 183 184 type Uri; 184 - type Description; 185 185 } 186 186 /// Empty state - all required fields are unset 187 187 pub struct Empty(()); 188 188 impl sealed::Sealed for Empty {} 189 189 impl State for Empty { 190 + type Description = Unset; 190 191 type Title = Unset; 191 192 type Uri = Unset; 192 - type Description = Unset; 193 + } 194 + ///State transition - sets the `description` field to Set 195 + pub struct SetDescription<St: State = Empty>(PhantomData<fn() -> St>); 196 + impl<St: State> sealed::Sealed for SetDescription<St> {} 197 + impl<St: State> State for SetDescription<St> { 198 + type Description = Set<members::description>; 199 + type Title = St::Title; 200 + type Uri = St::Uri; 193 201 } 194 202 ///State transition - sets the `title` field to Set 195 203 pub struct SetTitle<St: State = Empty>(PhantomData<fn() -> St>); 196 204 impl<St: State> sealed::Sealed for SetTitle<St> {} 197 205 impl<St: State> State for SetTitle<St> { 206 + type Description = St::Description; 198 207 type Title = Set<members::title>; 199 208 type Uri = St::Uri; 200 - type Description = St::Description; 201 209 } 202 210 ///State transition - sets the `uri` field to Set 203 211 pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>); 204 212 impl<St: State> sealed::Sealed for SetUri<St> {} 205 213 impl<St: State> State for SetUri<St> { 206 - type Title = St::Title; 207 - type Uri = Set<members::uri>; 208 214 type Description = St::Description; 209 - } 210 - ///State transition - sets the `description` field to Set 211 - pub struct SetDescription<St: State = Empty>(PhantomData<fn() -> St>); 212 - impl<St: State> sealed::Sealed for SetDescription<St> {} 213 - impl<St: State> State for SetDescription<St> { 214 215 type Title = St::Title; 215 - type Uri = St::Uri; 216 - type Description = Set<members::description>; 216 + type Uri = Set<members::uri>; 217 217 } 218 218 /// Marker types for field names 219 219 #[allow(non_camel_case_types)] 220 220 pub mod members { 221 + ///Marker type for the `description` field 222 + pub struct description(()); 221 223 ///Marker type for the `title` field 222 224 pub struct title(()); 223 225 ///Marker type for the `uri` field 224 226 pub struct uri(()); 225 - ///Marker type for the `description` field 226 - pub struct description(()); 227 227 } 228 228 } 229 229 ··· 343 343 impl<St, S: BosStr> ExternalBuilder<St, S> 344 344 where 345 345 St: external_state::State, 346 + St::Description: external_state::IsSet, 346 347 St::Title: external_state::IsSet, 347 348 St::Uri: external_state::IsSet, 348 - St::Description: external_state::IsSet, 349 349 { 350 350 /// Build the final struct. 351 351 pub fn build(self) -> External<S> { ··· 749 749 } 750 750 /// State trait tracking which required fields have been set 751 751 pub trait State: sealed::Sealed { 752 - type Title; 753 752 type Description; 754 753 type Uri; 754 + type Title; 755 755 } 756 756 /// Empty state - all required fields are unset 757 757 pub struct Empty(()); 758 758 impl sealed::Sealed for Empty {} 759 759 impl State for Empty { 760 - type Title = Unset; 761 760 type Description = Unset; 762 761 type Uri = Unset; 763 - } 764 - ///State transition - sets the `title` field to Set 765 - pub struct SetTitle<St: State = Empty>(PhantomData<fn() -> St>); 766 - impl<St: State> sealed::Sealed for SetTitle<St> {} 767 - impl<St: State> State for SetTitle<St> { 768 - type Title = Set<members::title>; 769 - type Description = St::Description; 770 - type Uri = St::Uri; 762 + type Title = Unset; 771 763 } 772 764 ///State transition - sets the `description` field to Set 773 765 pub struct SetDescription<St: State = Empty>(PhantomData<fn() -> St>); 774 766 impl<St: State> sealed::Sealed for SetDescription<St> {} 775 767 impl<St: State> State for SetDescription<St> { 776 - type Title = St::Title; 777 768 type Description = Set<members::description>; 778 769 type Uri = St::Uri; 770 + type Title = St::Title; 779 771 } 780 772 ///State transition - sets the `uri` field to Set 781 773 pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>); 782 774 impl<St: State> sealed::Sealed for SetUri<St> {} 783 775 impl<St: State> State for SetUri<St> { 784 - type Title = St::Title; 785 776 type Description = St::Description; 786 777 type Uri = Set<members::uri>; 778 + type Title = St::Title; 779 + } 780 + ///State transition - sets the `title` field to Set 781 + pub struct SetTitle<St: State = Empty>(PhantomData<fn() -> St>); 782 + impl<St: State> sealed::Sealed for SetTitle<St> {} 783 + impl<St: State> State for SetTitle<St> { 784 + type Description = St::Description; 785 + type Uri = St::Uri; 786 + type Title = Set<members::title>; 787 787 } 788 788 /// Marker types for field names 789 789 #[allow(non_camel_case_types)] 790 790 pub mod members { 791 - ///Marker type for the `title` field 792 - pub struct title(()); 793 791 ///Marker type for the `description` field 794 792 pub struct description(()); 795 793 ///Marker type for the `uri` field 796 794 pub struct uri(()); 795 + ///Marker type for the `title` field 796 + pub struct title(()); 797 797 } 798 798 } 799 799 ··· 913 913 impl<St, S: BosStr> ViewExternalBuilder<St, S> 914 914 where 915 915 St: view_external_state::State, 916 - St::Title: view_external_state::IsSet, 917 916 St::Description: view_external_state::IsSet, 918 917 St::Uri: view_external_state::IsSet, 918 + St::Title: view_external_state::IsSet, 919 919 { 920 920 /// Build the final struct. 921 921 pub fn build(self) -> ViewExternal<S> {
+26 -26
crates/jacquard-codegen-tests/src/generated/pretty/app_bsky/richtext/facet.rs
··· 219 219 } 220 220 /// State trait tracking which required fields have been set 221 221 pub trait State: sealed::Sealed { 222 - type ByteStart; 223 222 type ByteEnd; 223 + type ByteStart; 224 224 } 225 225 /// Empty state - all required fields are unset 226 226 pub struct Empty(()); 227 227 impl sealed::Sealed for Empty {} 228 228 impl State for Empty { 229 - type ByteStart = Unset; 230 229 type ByteEnd = Unset; 231 - } 232 - ///State transition - sets the `byte_start` field to Set 233 - pub struct SetByteStart<St: State = Empty>(PhantomData<fn() -> St>); 234 - impl<St: State> sealed::Sealed for SetByteStart<St> {} 235 - impl<St: State> State for SetByteStart<St> { 236 - type ByteStart = Set<members::byte_start>; 237 - type ByteEnd = St::ByteEnd; 230 + type ByteStart = Unset; 238 231 } 239 232 ///State transition - sets the `byte_end` field to Set 240 233 pub struct SetByteEnd<St: State = Empty>(PhantomData<fn() -> St>); 241 234 impl<St: State> sealed::Sealed for SetByteEnd<St> {} 242 235 impl<St: State> State for SetByteEnd<St> { 243 - type ByteStart = St::ByteStart; 244 236 type ByteEnd = Set<members::byte_end>; 237 + type ByteStart = St::ByteStart; 238 + } 239 + ///State transition - sets the `byte_start` field to Set 240 + pub struct SetByteStart<St: State = Empty>(PhantomData<fn() -> St>); 241 + impl<St: State> sealed::Sealed for SetByteStart<St> {} 242 + impl<St: State> State for SetByteStart<St> { 243 + type ByteEnd = St::ByteEnd; 244 + type ByteStart = Set<members::byte_start>; 245 245 } 246 246 /// Marker types for field names 247 247 #[allow(non_camel_case_types)] 248 248 pub mod members { 249 - ///Marker type for the `byte_start` field 250 - pub struct byte_start(()); 251 249 ///Marker type for the `byte_end` field 252 250 pub struct byte_end(()); 251 + ///Marker type for the `byte_start` field 252 + pub struct byte_start(()); 253 253 } 254 254 } 255 255 ··· 337 337 impl<St, S: BosStr> ByteSliceBuilder<St, S> 338 338 where 339 339 St: byte_slice_state::State, 340 - St::ByteStart: byte_slice_state::IsSet, 341 340 St::ByteEnd: byte_slice_state::IsSet, 341 + St::ByteStart: byte_slice_state::IsSet, 342 342 { 343 343 /// Build the final struct. 344 344 pub fn build(self) -> ByteSlice<S> { ··· 652 652 } 653 653 /// State trait tracking which required fields have been set 654 654 pub trait State: sealed::Sealed { 655 - type Index; 656 655 type Features; 656 + type Index; 657 657 } 658 658 /// Empty state - all required fields are unset 659 659 pub struct Empty(()); 660 660 impl sealed::Sealed for Empty {} 661 661 impl State for Empty { 662 - type Index = Unset; 663 662 type Features = Unset; 664 - } 665 - ///State transition - sets the `index` field to Set 666 - pub struct SetIndex<St: State = Empty>(PhantomData<fn() -> St>); 667 - impl<St: State> sealed::Sealed for SetIndex<St> {} 668 - impl<St: State> State for SetIndex<St> { 669 - type Index = Set<members::index>; 670 - type Features = St::Features; 663 + type Index = Unset; 671 664 } 672 665 ///State transition - sets the `features` field to Set 673 666 pub struct SetFeatures<St: State = Empty>(PhantomData<fn() -> St>); 674 667 impl<St: State> sealed::Sealed for SetFeatures<St> {} 675 668 impl<St: State> State for SetFeatures<St> { 676 - type Index = St::Index; 677 669 type Features = Set<members::features>; 670 + type Index = St::Index; 671 + } 672 + ///State transition - sets the `index` field to Set 673 + pub struct SetIndex<St: State = Empty>(PhantomData<fn() -> St>); 674 + impl<St: State> sealed::Sealed for SetIndex<St> {} 675 + impl<St: State> State for SetIndex<St> { 676 + type Features = St::Features; 677 + type Index = Set<members::index>; 678 678 } 679 679 /// Marker types for field names 680 680 #[allow(non_camel_case_types)] 681 681 pub mod members { 682 - ///Marker type for the `index` field 683 - pub struct index(()); 684 682 ///Marker type for the `features` field 685 683 pub struct features(()); 684 + ///Marker type for the `index` field 685 + pub struct index(()); 686 686 } 687 687 } 688 688 ··· 770 770 impl<St, S: BosStr> FacetBuilder<St, S> 771 771 where 772 772 St: facet_state::State, 773 - St::Index: facet_state::IsSet, 774 773 St::Features: facet_state::IsSet, 774 + St::Index: facet_state::IsSet, 775 775 { 776 776 /// Build the final struct. 777 777 pub fn build(self) -> Facet<S> {
+72 -72
crates/jacquard-codegen-tests/src/generated/pretty/com_atproto/label.rs
··· 679 679 } 680 680 /// State trait tracking which required fields have been set 681 681 pub trait State: sealed::Sealed { 682 + type Cts; 682 683 type Src; 683 - type Uri; 684 684 type Val; 685 - type Cts; 685 + type Uri; 686 686 } 687 687 /// Empty state - all required fields are unset 688 688 pub struct Empty(()); 689 689 impl sealed::Sealed for Empty {} 690 690 impl State for Empty { 691 + type Cts = Unset; 691 692 type Src = Unset; 693 + type Val = Unset; 692 694 type Uri = Unset; 693 - type Val = Unset; 694 - type Cts = Unset; 695 + } 696 + ///State transition - sets the `cts` field to Set 697 + pub struct SetCts<St: State = Empty>(PhantomData<fn() -> St>); 698 + impl<St: State> sealed::Sealed for SetCts<St> {} 699 + impl<St: State> State for SetCts<St> { 700 + type Cts = Set<members::cts>; 701 + type Src = St::Src; 702 + type Val = St::Val; 703 + type Uri = St::Uri; 695 704 } 696 705 ///State transition - sets the `src` field to Set 697 706 pub struct SetSrc<St: State = Empty>(PhantomData<fn() -> St>); 698 707 impl<St: State> sealed::Sealed for SetSrc<St> {} 699 708 impl<St: State> State for SetSrc<St> { 700 - type Src = Set<members::src>; 701 - type Uri = St::Uri; 702 - type Val = St::Val; 703 709 type Cts = St::Cts; 704 - } 705 - ///State transition - sets the `uri` field to Set 706 - pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>); 707 - impl<St: State> sealed::Sealed for SetUri<St> {} 708 - impl<St: State> State for SetUri<St> { 709 - type Src = St::Src; 710 - type Uri = Set<members::uri>; 710 + type Src = Set<members::src>; 711 711 type Val = St::Val; 712 - type Cts = St::Cts; 712 + type Uri = St::Uri; 713 713 } 714 714 ///State transition - sets the `val` field to Set 715 715 pub struct SetVal<St: State = Empty>(PhantomData<fn() -> St>); 716 716 impl<St: State> sealed::Sealed for SetVal<St> {} 717 717 impl<St: State> State for SetVal<St> { 718 + type Cts = St::Cts; 718 719 type Src = St::Src; 719 - type Uri = St::Uri; 720 720 type Val = Set<members::val>; 721 - type Cts = St::Cts; 721 + type Uri = St::Uri; 722 722 } 723 - ///State transition - sets the `cts` field to Set 724 - pub struct SetCts<St: State = Empty>(PhantomData<fn() -> St>); 725 - impl<St: State> sealed::Sealed for SetCts<St> {} 726 - impl<St: State> State for SetCts<St> { 723 + ///State transition - sets the `uri` field to Set 724 + pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>); 725 + impl<St: State> sealed::Sealed for SetUri<St> {} 726 + impl<St: State> State for SetUri<St> { 727 + type Cts = St::Cts; 727 728 type Src = St::Src; 728 - type Uri = St::Uri; 729 729 type Val = St::Val; 730 - type Cts = Set<members::cts>; 730 + type Uri = Set<members::uri>; 731 731 } 732 732 /// Marker types for field names 733 733 #[allow(non_camel_case_types)] 734 734 pub mod members { 735 + ///Marker type for the `cts` field 736 + pub struct cts(()); 735 737 ///Marker type for the `src` field 736 738 pub struct src(()); 737 - ///Marker type for the `uri` field 738 - pub struct uri(()); 739 739 ///Marker type for the `val` field 740 740 pub struct val(()); 741 - ///Marker type for the `cts` field 742 - pub struct cts(()); 741 + ///Marker type for the `uri` field 742 + pub struct uri(()); 743 743 } 744 744 } 745 745 ··· 940 940 impl<St, S: BosStr> LabelBuilder<St, S> 941 941 where 942 942 St: label_state::State, 943 + St::Cts: label_state::IsSet, 943 944 St::Src: label_state::IsSet, 944 - St::Uri: label_state::IsSet, 945 945 St::Val: label_state::IsSet, 946 - St::Cts: label_state::IsSet, 946 + St::Uri: label_state::IsSet, 947 947 { 948 948 /// Build the final struct. 949 949 pub fn build(self) -> Label<S> { ··· 1315 1315 } 1316 1316 /// State trait tracking which required fields have been set 1317 1317 pub trait State: sealed::Sealed { 1318 - type Locales; 1318 + type Identifier; 1319 1319 type Severity; 1320 + type Locales; 1320 1321 type Blurs; 1321 - type Identifier; 1322 1322 } 1323 1323 /// Empty state - all required fields are unset 1324 1324 pub struct Empty(()); 1325 1325 impl sealed::Sealed for Empty {} 1326 1326 impl State for Empty { 1327 + type Identifier = Unset; 1328 + type Severity = Unset; 1327 1329 type Locales = Unset; 1328 - type Severity = Unset; 1329 1330 type Blurs = Unset; 1330 - type Identifier = Unset; 1331 1331 } 1332 - ///State transition - sets the `locales` field to Set 1333 - pub struct SetLocales<St: State = Empty>(PhantomData<fn() -> St>); 1334 - impl<St: State> sealed::Sealed for SetLocales<St> {} 1335 - impl<St: State> State for SetLocales<St> { 1336 - type Locales = Set<members::locales>; 1332 + ///State transition - sets the `identifier` field to Set 1333 + pub struct SetIdentifier<St: State = Empty>(PhantomData<fn() -> St>); 1334 + impl<St: State> sealed::Sealed for SetIdentifier<St> {} 1335 + impl<St: State> State for SetIdentifier<St> { 1336 + type Identifier = Set<members::identifier>; 1337 1337 type Severity = St::Severity; 1338 + type Locales = St::Locales; 1338 1339 type Blurs = St::Blurs; 1339 - type Identifier = St::Identifier; 1340 1340 } 1341 1341 ///State transition - sets the `severity` field to Set 1342 1342 pub struct SetSeverity<St: State = Empty>(PhantomData<fn() -> St>); 1343 1343 impl<St: State> sealed::Sealed for SetSeverity<St> {} 1344 1344 impl<St: State> State for SetSeverity<St> { 1345 + type Identifier = St::Identifier; 1346 + type Severity = Set<members::severity>; 1345 1347 type Locales = St::Locales; 1346 - type Severity = Set<members::severity>; 1347 1348 type Blurs = St::Blurs; 1349 + } 1350 + ///State transition - sets the `locales` field to Set 1351 + pub struct SetLocales<St: State = Empty>(PhantomData<fn() -> St>); 1352 + impl<St: State> sealed::Sealed for SetLocales<St> {} 1353 + impl<St: State> State for SetLocales<St> { 1348 1354 type Identifier = St::Identifier; 1355 + type Severity = St::Severity; 1356 + type Locales = Set<members::locales>; 1357 + type Blurs = St::Blurs; 1349 1358 } 1350 1359 ///State transition - sets the `blurs` field to Set 1351 1360 pub struct SetBlurs<St: State = Empty>(PhantomData<fn() -> St>); 1352 1361 impl<St: State> sealed::Sealed for SetBlurs<St> {} 1353 1362 impl<St: State> State for SetBlurs<St> { 1354 - type Locales = St::Locales; 1355 - type Severity = St::Severity; 1356 - type Blurs = Set<members::blurs>; 1357 1363 type Identifier = St::Identifier; 1358 - } 1359 - ///State transition - sets the `identifier` field to Set 1360 - pub struct SetIdentifier<St: State = Empty>(PhantomData<fn() -> St>); 1361 - impl<St: State> sealed::Sealed for SetIdentifier<St> {} 1362 - impl<St: State> State for SetIdentifier<St> { 1363 - type Locales = St::Locales; 1364 1364 type Severity = St::Severity; 1365 - type Blurs = St::Blurs; 1366 - type Identifier = Set<members::identifier>; 1365 + type Locales = St::Locales; 1366 + type Blurs = Set<members::blurs>; 1367 1367 } 1368 1368 /// Marker types for field names 1369 1369 #[allow(non_camel_case_types)] 1370 1370 pub mod members { 1371 + ///Marker type for the `identifier` field 1372 + pub struct identifier(()); 1373 + ///Marker type for the `severity` field 1374 + pub struct severity(()); 1371 1375 ///Marker type for the `locales` field 1372 1376 pub struct locales(()); 1373 - ///Marker type for the `severity` field 1374 - pub struct severity(()); 1375 1377 ///Marker type for the `blurs` field 1376 1378 pub struct blurs(()); 1377 - ///Marker type for the `identifier` field 1378 - pub struct identifier(()); 1379 1379 } 1380 1380 } 1381 1381 ··· 1558 1558 impl<St, S: BosStr> LabelValueDefinitionBuilder<St, S> 1559 1559 where 1560 1560 St: label_value_definition_state::State, 1561 - St::Locales: label_value_definition_state::IsSet, 1561 + St::Identifier: label_value_definition_state::IsSet, 1562 1562 St::Severity: label_value_definition_state::IsSet, 1563 + St::Locales: label_value_definition_state::IsSet, 1563 1564 St::Blurs: label_value_definition_state::IsSet, 1564 - St::Identifier: label_value_definition_state::IsSet, 1565 1565 { 1566 1566 /// Build the final struct. 1567 1567 pub fn build(self) -> LabelValueDefinition<S> { ··· 1602 1602 } 1603 1603 /// State trait tracking which required fields have been set 1604 1604 pub trait State: sealed::Sealed { 1605 - type Lang; 1606 1605 type Description; 1607 1606 type Name; 1607 + type Lang; 1608 1608 } 1609 1609 /// Empty state - all required fields are unset 1610 1610 pub struct Empty(()); 1611 1611 impl sealed::Sealed for Empty {} 1612 1612 impl State for Empty { 1613 - type Lang = Unset; 1614 1613 type Description = Unset; 1615 1614 type Name = Unset; 1616 - } 1617 - ///State transition - sets the `lang` field to Set 1618 - pub struct SetLang<St: State = Empty>(PhantomData<fn() -> St>); 1619 - impl<St: State> sealed::Sealed for SetLang<St> {} 1620 - impl<St: State> State for SetLang<St> { 1621 - type Lang = Set<members::lang>; 1622 - type Description = St::Description; 1623 - type Name = St::Name; 1615 + type Lang = Unset; 1624 1616 } 1625 1617 ///State transition - sets the `description` field to Set 1626 1618 pub struct SetDescription<St: State = Empty>(PhantomData<fn() -> St>); 1627 1619 impl<St: State> sealed::Sealed for SetDescription<St> {} 1628 1620 impl<St: State> State for SetDescription<St> { 1629 - type Lang = St::Lang; 1630 1621 type Description = Set<members::description>; 1631 1622 type Name = St::Name; 1623 + type Lang = St::Lang; 1632 1624 } 1633 1625 ///State transition - sets the `name` field to Set 1634 1626 pub struct SetName<St: State = Empty>(PhantomData<fn() -> St>); 1635 1627 impl<St: State> sealed::Sealed for SetName<St> {} 1636 1628 impl<St: State> State for SetName<St> { 1637 - type Lang = St::Lang; 1638 1629 type Description = St::Description; 1639 1630 type Name = Set<members::name>; 1631 + type Lang = St::Lang; 1632 + } 1633 + ///State transition - sets the `lang` field to Set 1634 + pub struct SetLang<St: State = Empty>(PhantomData<fn() -> St>); 1635 + impl<St: State> sealed::Sealed for SetLang<St> {} 1636 + impl<St: State> State for SetLang<St> { 1637 + type Description = St::Description; 1638 + type Name = St::Name; 1639 + type Lang = Set<members::lang>; 1640 1640 } 1641 1641 /// Marker types for field names 1642 1642 #[allow(non_camel_case_types)] 1643 1643 pub mod members { 1644 - ///Marker type for the `lang` field 1645 - pub struct lang(()); 1646 1644 ///Marker type for the `description` field 1647 1645 pub struct description(()); 1648 1646 ///Marker type for the `name` field 1649 1647 pub struct name(()); 1648 + ///Marker type for the `lang` field 1649 + pub struct lang(()); 1650 1650 } 1651 1651 } 1652 1652 ··· 1776 1776 impl<St, S: BosStr> LabelValueDefinitionStringsBuilder<St, S> 1777 1777 where 1778 1778 St: label_value_definition_strings_state::State, 1779 - St::Lang: label_value_definition_strings_state::IsSet, 1780 1779 St::Description: label_value_definition_strings_state::IsSet, 1781 1780 St::Name: label_value_definition_strings_state::IsSet, 1781 + St::Lang: label_value_definition_strings_state::IsSet, 1782 1782 { 1783 1783 /// Build the final struct. 1784 1784 pub fn build(self) -> LabelValueDefinitionStrings<S> {
+13 -13
crates/jacquard-codegen-tests/src/generated/pretty/com_atproto/repo/strong_ref.rs
··· 59 59 } 60 60 /// State trait tracking which required fields have been set 61 61 pub trait State: sealed::Sealed { 62 - type Cid; 63 62 type Uri; 63 + type Cid; 64 64 } 65 65 /// Empty state - all required fields are unset 66 66 pub struct Empty(()); 67 67 impl sealed::Sealed for Empty {} 68 68 impl State for Empty { 69 - type Cid = Unset; 70 69 type Uri = Unset; 71 - } 72 - ///State transition - sets the `cid` field to Set 73 - pub struct SetCid<St: State = Empty>(PhantomData<fn() -> St>); 74 - impl<St: State> sealed::Sealed for SetCid<St> {} 75 - impl<St: State> State for SetCid<St> { 76 - type Cid = Set<members::cid>; 77 - type Uri = St::Uri; 70 + type Cid = Unset; 78 71 } 79 72 ///State transition - sets the `uri` field to Set 80 73 pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>); 81 74 impl<St: State> sealed::Sealed for SetUri<St> {} 82 75 impl<St: State> State for SetUri<St> { 83 - type Cid = St::Cid; 84 76 type Uri = Set<members::uri>; 77 + type Cid = St::Cid; 78 + } 79 + ///State transition - sets the `cid` field to Set 80 + pub struct SetCid<St: State = Empty>(PhantomData<fn() -> St>); 81 + impl<St: State> sealed::Sealed for SetCid<St> {} 82 + impl<St: State> State for SetCid<St> { 83 + type Uri = St::Uri; 84 + type Cid = Set<members::cid>; 85 85 } 86 86 /// Marker types for field names 87 87 #[allow(non_camel_case_types)] 88 88 pub mod members { 89 - ///Marker type for the `cid` field 90 - pub struct cid(()); 91 89 ///Marker type for the `uri` field 92 90 pub struct uri(()); 91 + ///Marker type for the `cid` field 92 + pub struct cid(()); 93 93 } 94 94 } 95 95 ··· 177 177 impl<St, S: BosStr> StrongRefBuilder<St, S> 178 178 where 179 179 St: strong_ref_state::State, 180 - St::Cid: strong_ref_state::IsSet, 181 180 St::Uri: strong_ref_state::IsSet, 181 + St::Cid: strong_ref_state::IsSet, 182 182 { 183 183 /// Build the final struct. 184 184 pub fn build(self) -> StrongRef<S> {
+13 -13
crates/jacquard-codegen-tests/src/generated/pretty/test_ns3/collision.rs
··· 316 316 } 317 317 /// State trait tracking which required fields have been set 318 318 pub trait State: sealed::Sealed { 319 - type LocalFoo; 320 319 type ExternalFoo; 320 + type LocalFoo; 321 321 } 322 322 /// Empty state - all required fields are unset 323 323 pub struct Empty(()); 324 324 impl sealed::Sealed for Empty {} 325 325 impl State for Empty { 326 - type LocalFoo = Unset; 327 326 type ExternalFoo = Unset; 328 - } 329 - ///State transition - sets the `local_foo` field to Set 330 - pub struct SetLocalFoo<St: State = Empty>(PhantomData<fn() -> St>); 331 - impl<St: State> sealed::Sealed for SetLocalFoo<St> {} 332 - impl<St: State> State for SetLocalFoo<St> { 333 - type LocalFoo = Set<members::local_foo>; 334 - type ExternalFoo = St::ExternalFoo; 327 + type LocalFoo = Unset; 335 328 } 336 329 ///State transition - sets the `external_foo` field to Set 337 330 pub struct SetExternalFoo<St: State = Empty>(PhantomData<fn() -> St>); 338 331 impl<St: State> sealed::Sealed for SetExternalFoo<St> {} 339 332 impl<St: State> State for SetExternalFoo<St> { 340 - type LocalFoo = St::LocalFoo; 341 333 type ExternalFoo = Set<members::external_foo>; 334 + type LocalFoo = St::LocalFoo; 335 + } 336 + ///State transition - sets the `local_foo` field to Set 337 + pub struct SetLocalFoo<St: State = Empty>(PhantomData<fn() -> St>); 338 + impl<St: State> sealed::Sealed for SetLocalFoo<St> {} 339 + impl<St: State> State for SetLocalFoo<St> { 340 + type ExternalFoo = St::ExternalFoo; 341 + type LocalFoo = Set<members::local_foo>; 342 342 } 343 343 /// Marker types for field names 344 344 #[allow(non_camel_case_types)] 345 345 pub mod members { 346 - ///Marker type for the `local_foo` field 347 - pub struct local_foo(()); 348 346 ///Marker type for the `external_foo` field 349 347 pub struct external_foo(()); 348 + ///Marker type for the `local_foo` field 349 + pub struct local_foo(()); 350 350 } 351 351 } 352 352 ··· 447 447 impl<St, S: BosStr> CollisionBuilder<St, S> 448 448 where 449 449 St: collision_state::State, 450 - St::LocalFoo: collision_state::IsSet, 451 450 St::ExternalFoo: collision_state::IsSet, 451 + St::LocalFoo: collision_state::IsSet, 452 452 { 453 453 /// Build the final struct. 454 454 pub fn build(self) -> Collision<S> {
+1 -1
crates/jacquard-lexicon/src/codegen/builder_gen/builder_struct.rs
··· 83 83 quote! {} 84 84 }; 85 85 quote! { 86 - impl #type_ident<DefaultStr> { 86 + impl #type_ident<#default_str_path> { 87 87 /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 88 88 pub fn new() -> #builder_name<#lifetime #state_mod_name::Empty, #default_str_path> { 89 89 #builder_name::new()
+1 -1
crates/jacquard/src/client.rs
··· 829 829 "no rkey", 830 830 ClientError::invalid_request("no rkey"), 831 831 ))?; 832 - let request = GetRecord::new() 832 + let request = GetRecord::builder() 833 833 .repo(uri.authority().clone()) 834 834 .collection(collection.clone()) 835 835 .rkey(RecordKey(rkey.clone()))
+1 -1
examples/oauth_timeline.rs
··· 72 72 73 73 // Wrap in Agent and fetch the timeline 74 74 let agent: Agent<_> = Agent::from(session); 75 - let output = agent.send(GetTimeline::builder().limit(5).build()).await?; 75 + let output = agent.send(GetTimeline::new().limit(5).build()).await?; 76 76 let timeline = output.into_output()?; 77 77 for (i, post) in timeline.feed.iter().enumerate() { 78 78 println!("\n{}. by {}", i + 1, post.post.author.handle);