• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // This file is part of ICU4X. For terms of use, please see the file
2 // called LICENSE at the top level of the ICU4X source tree
3 // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
4 
5 #[diplomat::bridge]
6 #[diplomat::abi_rename = "icu4x_{0}_mv1"]
7 #[diplomat::attr(auto, namespace = "icu4x")]
8 pub mod ffi {
9     use alloc::boxed::Box;
10     #[cfg(any(feature = "compiled_data", feature = "buffer_provider"))]
11     use icu_properties::props::GeneralCategory;
12     #[cfg(any(feature = "compiled_data", feature = "buffer_provider"))]
13     use icu_properties::props::{
14         Alnum, Alphabetic, AsciiHexDigit, BidiControl, BidiMirrored, Blank, CaseIgnorable,
15         CaseSensitive, Cased, ChangesWhenCasefolded, ChangesWhenCasemapped, ChangesWhenLowercased,
16         ChangesWhenNfkcCasefolded, ChangesWhenTitlecased, ChangesWhenUppercased, Dash,
17         DefaultIgnorableCodePoint, Deprecated, Diacritic, Emoji, EmojiComponent, EmojiModifier,
18         EmojiModifierBase, EmojiPresentation, ExtendedPictographic, Extender,
19         FullCompositionExclusion, Graph, GraphemeBase, GraphemeExtend, GraphemeLink, HexDigit,
20         Hyphen, IdContinue, IdStart, Ideographic, IdsBinaryOperator, IdsTrinaryOperator,
21         JoinControl, LogicalOrderException, Lowercase, Math, NfcInert, NfdInert, NfkcInert,
22         NfkdInert, NoncharacterCodePoint, PatternSyntax, PatternWhiteSpace,
23         PrependedConcatenationMark, Print, QuotationMark, Radical, RegionalIndicator,
24         SegmentStarter, SentenceTerminal, SoftDotted, TerminalPunctuation, UnifiedIdeograph,
25         Uppercase, VariationSelector, WhiteSpace, Xdigit, XidContinue, XidStart,
26     };
27 
28     #[cfg(any(feature = "compiled_data", feature = "buffer_provider"))]
29     use crate::errors::ffi::DataError;
30     use crate::properties_iter::ffi::CodePointRangeIterator;
31     #[cfg(feature = "buffer_provider")]
32     use crate::provider::ffi::DataProvider;
33 
34     #[cfg(feature = "compiled_data")]
35     use diplomat_runtime::DiplomatChar;
36 
37     #[diplomat::opaque]
38     /// An ICU4X Unicode Set Property object, capable of querying whether a code point is contained in a set based on a Unicode property.
39     #[diplomat::rust_link(icu::properties, Mod)]
40     #[diplomat::rust_link(icu::properties::CodePointSetData, Struct)]
41     #[diplomat::rust_link(icu::properties::CodePointSetData::new, FnInStruct, hidden)]
42     #[diplomat::rust_link(icu::properties::CodePointSetDataBorrowed::new, FnInStruct, hidden)]
43     #[diplomat::rust_link(icu::properties::CodePointSetDataBorrowed, Struct)]
44     pub struct CodePointSetData(pub icu_properties::CodePointSetData);
45 
46     impl CodePointSetData {
47         /// Checks whether the code point is in the set.
48         #[diplomat::rust_link(icu::properties::CodePointSetDataBorrowed::contains, FnInStruct)]
49         #[diplomat::rust_link(
50             icu::properties::CodePointSetDataBorrowed::contains32,
51             FnInStruct,
52             hidden
53         )]
contains(&self, cp: DiplomatChar) -> bool54         pub fn contains(&self, cp: DiplomatChar) -> bool {
55             self.0.as_borrowed().contains32(cp)
56         }
57 
58         /// Produces an iterator over ranges of code points contained in this set
59         #[diplomat::rust_link(icu::properties::CodePointSetDataBorrowed::iter_ranges, FnInStruct)]
iter_ranges<'a>(&'a self) -> Box<CodePointRangeIterator<'a>>60         pub fn iter_ranges<'a>(&'a self) -> Box<CodePointRangeIterator<'a>> {
61             Box::new(CodePointRangeIterator(Box::new(
62                 self.0.as_borrowed().iter_ranges(),
63             )))
64         }
65 
66         /// Produces an iterator over ranges of code points not contained in this set
67         #[diplomat::rust_link(
68             icu::properties::CodePointSetDataBorrowed::iter_ranges_complemented,
69             FnInStruct
70         )]
iter_ranges_complemented<'a>(&'a self) -> Box<CodePointRangeIterator<'a>>71         pub fn iter_ranges_complemented<'a>(&'a self) -> Box<CodePointRangeIterator<'a>> {
72             Box::new(CodePointRangeIterator(Box::new(
73                 self.0.as_borrowed().iter_ranges_complemented(),
74             )))
75         }
76 
77         /// Produces a set for obtaining General Category Group values
78         /// which is a mask with the same format as the `U_GC_XX_MASK` mask in ICU4C, using compiled data.
79         #[diplomat::rust_link(icu::properties::props::GeneralCategoryGroup, Struct)]
80         #[diplomat::rust_link(
81             icu::properties::CodePointMapDataBorrowed::get_set_for_value_group,
82             FnInStruct
83         )]
84         #[diplomat::attr(auto, named_constructor = "general_category_group")]
85         #[cfg(feature = "compiled_data")]
create_general_category_group( group: crate::properties_enums::ffi::GeneralCategoryGroup, ) -> Box<CodePointSetData>86         pub fn create_general_category_group(
87             group: crate::properties_enums::ffi::GeneralCategoryGroup,
88         ) -> Box<CodePointSetData> {
89             let data = icu_properties::CodePointMapData::<GeneralCategory>::new().static_to_owned();
90 
91             Box::new(CodePointSetData(
92                 data.as_borrowed()
93                     .get_set_for_value_group(group.into_props_group()),
94             ))
95         }
96 
97         /// Produces a set for obtaining General Category Group values
98         /// which is a mask with the same format as the `U_GC_XX_MASK` mask in ICU4C, using a provided data source.
99         #[diplomat::rust_link(icu::properties::props::GeneralCategoryGroup, Struct)]
100         #[diplomat::rust_link(
101             icu::properties::CodePointMapDataBorrowed::get_set_for_value_group,
102             FnInStruct
103         )]
104         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "general_category_group_with_provider")]
105         #[cfg(feature = "buffer_provider")]
create_general_category_group_with_provider( provider: &DataProvider, group: u32, ) -> Result<Box<CodePointSetData>, DataError>106         pub fn create_general_category_group_with_provider(
107             provider: &DataProvider,
108             group: u32,
109         ) -> Result<Box<CodePointSetData>, DataError> {
110             Ok(Box::new(CodePointSetData(
111                 icu_properties::CodePointMapData::<GeneralCategory>::try_new_unstable(
112                     &provider.get_unstable()?,
113                 )?
114                 .as_borrowed()
115                 .get_set_for_value_group(group.into()),
116             )))
117         }
118 
119         /// Get the `Ascii_Hex_Digit` value for a given character, using compiled data
120         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
121         #[cfg(feature = "compiled_data")]
ascii_hex_digit_for_char(ch: DiplomatChar) -> bool122         pub fn ascii_hex_digit_for_char(ch: DiplomatChar) -> bool {
123             icu_properties::CodePointSetData::new::<AsciiHexDigit>().contains32(ch)
124         }
125         /// Create a set for the `Ascii_Hex_Digit` property, using compiled data.
126         #[diplomat::rust_link(icu::properties::props::AsciiHexDigit, Struct)]
127         #[diplomat::attr(auto, named_constructor = "ascii_hex_digit")]
128         #[cfg(feature = "compiled_data")]
create_ascii_hex_digit() -> Box<CodePointSetData>129         pub fn create_ascii_hex_digit() -> Box<CodePointSetData> {
130             Box::new(CodePointSetData(
131                 icu_properties::CodePointSetData::new::<AsciiHexDigit>().static_to_owned(),
132             ))
133         }
134 
135         /// Create a set for the `Ascii_Hex_Digit` property, using a particular data source.
136         #[diplomat::rust_link(icu::properties::props::AsciiHexDigit, Struct)]
137         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "ascii_hex_digit_with_provider")]
138         #[cfg(feature = "buffer_provider")]
create_ascii_hex_digit_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>139         pub fn create_ascii_hex_digit_with_provider(
140             provider: &DataProvider,
141         ) -> Result<Box<CodePointSetData>, DataError> {
142             Ok(Box::new(CodePointSetData(
143                 icu_properties::CodePointSetData::try_new_unstable::<AsciiHexDigit>(
144                     &provider.get_unstable()?,
145                 )?,
146             )))
147         }
148 
149         /// Get the `Alnum` value for a given character, using compiled data
150         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
151         #[cfg(feature = "compiled_data")]
alnum_for_char(ch: DiplomatChar) -> bool152         pub fn alnum_for_char(ch: DiplomatChar) -> bool {
153             icu_properties::CodePointSetData::new::<Alnum>().contains32(ch)
154         }
155         /// Create a set for the `Alnum` property, using compiled data.
156         #[diplomat::rust_link(icu::properties::props::Alnum, Struct)]
157         #[diplomat::attr(auto, named_constructor = "alnum")]
158         #[cfg(feature = "compiled_data")]
create_alnum() -> Box<CodePointSetData>159         pub fn create_alnum() -> Box<CodePointSetData> {
160             Box::new(CodePointSetData(
161                 icu_properties::CodePointSetData::new::<Alnum>().static_to_owned(),
162             ))
163         }
164 
165         /// Create a set for the `Alnum` property, using a particular data source.
166         #[diplomat::rust_link(icu::properties::props::Alnum, Struct)]
167         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "alnum_with_provider")]
168         #[cfg(feature = "buffer_provider")]
create_alnum_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>169         pub fn create_alnum_with_provider(
170             provider: &DataProvider,
171         ) -> Result<Box<CodePointSetData>, DataError> {
172             Ok(Box::new(CodePointSetData(
173                 icu_properties::CodePointSetData::try_new_unstable::<Alnum>(
174                     &provider.get_unstable()?,
175                 )?,
176             )))
177         }
178 
179         /// Get the `Alphabetic` value for a given character, using compiled data
180         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
181         #[cfg(feature = "compiled_data")]
alphabetic_for_char(ch: DiplomatChar) -> bool182         pub fn alphabetic_for_char(ch: DiplomatChar) -> bool {
183             icu_properties::CodePointSetData::new::<Alphabetic>().contains32(ch)
184         }
185         /// Create a set for the `Alphabetic` property, using compiled data.
186         #[diplomat::rust_link(icu::properties::props::Alphabetic, Struct)]
187         #[diplomat::attr(auto, named_constructor = "alphabetic")]
188         #[cfg(feature = "compiled_data")]
create_alphabetic() -> Box<CodePointSetData>189         pub fn create_alphabetic() -> Box<CodePointSetData> {
190             Box::new(CodePointSetData(
191                 icu_properties::CodePointSetData::new::<Alphabetic>().static_to_owned(),
192             ))
193         }
194 
195         /// Create a set for the `Alphabetic` property, using a particular data source.
196         #[diplomat::rust_link(icu::properties::props::Alphabetic, Struct)]
197         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "alphabetic_with_provider")]
198         #[cfg(feature = "buffer_provider")]
create_alphabetic_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>199         pub fn create_alphabetic_with_provider(
200             provider: &DataProvider,
201         ) -> Result<Box<CodePointSetData>, DataError> {
202             Ok(Box::new(CodePointSetData(
203                 icu_properties::CodePointSetData::try_new_unstable::<Alphabetic>(
204                     &provider.get_unstable()?,
205                 )?,
206             )))
207         }
208 
209         /// Get the `Bidi_Control` value for a given character, using compiled data
210         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
211         #[cfg(feature = "compiled_data")]
bidi_control_for_char(ch: DiplomatChar) -> bool212         pub fn bidi_control_for_char(ch: DiplomatChar) -> bool {
213             icu_properties::CodePointSetData::new::<BidiControl>().contains32(ch)
214         }
215         /// Create a set for the `Bidi_Control` property, using compiled data.
216         #[diplomat::rust_link(icu::properties::props::BidiControl, Struct)]
217         #[diplomat::attr(auto, named_constructor = "bidi_control")]
218         #[cfg(feature = "compiled_data")]
create_bidi_control() -> Box<CodePointSetData>219         pub fn create_bidi_control() -> Box<CodePointSetData> {
220             Box::new(CodePointSetData(
221                 icu_properties::CodePointSetData::new::<BidiControl>().static_to_owned(),
222             ))
223         }
224 
225         /// Create a set for the `Bidi_Control` property, using a particular data source.
226         #[diplomat::rust_link(icu::properties::props::BidiControl, Struct)]
227         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "bidi_control_with_provider")]
228         #[cfg(feature = "buffer_provider")]
create_bidi_control_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>229         pub fn create_bidi_control_with_provider(
230             provider: &DataProvider,
231         ) -> Result<Box<CodePointSetData>, DataError> {
232             Ok(Box::new(CodePointSetData(
233                 icu_properties::CodePointSetData::try_new_unstable::<BidiControl>(
234                     &provider.get_unstable()?,
235                 )?,
236             )))
237         }
238 
239         /// Get the `Bidi_Mirrored` value for a given character, using compiled data
240         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
241         #[cfg(feature = "compiled_data")]
bidi_mirrored_for_char(ch: DiplomatChar) -> bool242         pub fn bidi_mirrored_for_char(ch: DiplomatChar) -> bool {
243             icu_properties::CodePointSetData::new::<BidiMirrored>().contains32(ch)
244         }
245         /// Create a set for the `Bidi_Mirrored` property, using compiled data.
246         #[diplomat::rust_link(icu::properties::props::BidiMirrored, Struct)]
247         #[diplomat::attr(auto, named_constructor = "bidi_mirrored")]
248         #[cfg(feature = "compiled_data")]
create_bidi_mirrored() -> Box<CodePointSetData>249         pub fn create_bidi_mirrored() -> Box<CodePointSetData> {
250             Box::new(CodePointSetData(
251                 icu_properties::CodePointSetData::new::<BidiMirrored>().static_to_owned(),
252             ))
253         }
254 
255         /// Create a set for the `Bidi_Mirrored` property, using a particular data source.
256         #[diplomat::rust_link(icu::properties::props::BidiMirrored, Struct)]
257         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "bidi_mirrored_with_provider")]
258         #[cfg(feature = "buffer_provider")]
create_bidi_mirrored_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>259         pub fn create_bidi_mirrored_with_provider(
260             provider: &DataProvider,
261         ) -> Result<Box<CodePointSetData>, DataError> {
262             Ok(Box::new(CodePointSetData(
263                 icu_properties::CodePointSetData::try_new_unstable::<BidiMirrored>(
264                     &provider.get_unstable()?,
265                 )?,
266             )))
267         }
268 
269         /// Get the `Blank` value for a given character, using compiled data
270         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
271         #[cfg(feature = "compiled_data")]
blank_for_char(ch: DiplomatChar) -> bool272         pub fn blank_for_char(ch: DiplomatChar) -> bool {
273             icu_properties::CodePointSetData::new::<Blank>().contains32(ch)
274         }
275         /// Create a set for the `Blank` property, using compiled data.
276         #[diplomat::rust_link(icu::properties::props::Blank, Struct)]
277         #[diplomat::attr(auto, named_constructor = "blank")]
278         #[cfg(feature = "compiled_data")]
create_blank() -> Box<CodePointSetData>279         pub fn create_blank() -> Box<CodePointSetData> {
280             Box::new(CodePointSetData(
281                 icu_properties::CodePointSetData::new::<Blank>().static_to_owned(),
282             ))
283         }
284 
285         /// Create a set for the `Blank` property, using a particular data source.
286         #[diplomat::rust_link(icu::properties::props::Blank, Struct)]
287         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "blank_with_provider")]
288         #[cfg(feature = "buffer_provider")]
create_blank_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>289         pub fn create_blank_with_provider(
290             provider: &DataProvider,
291         ) -> Result<Box<CodePointSetData>, DataError> {
292             Ok(Box::new(CodePointSetData(
293                 icu_properties::CodePointSetData::try_new_unstable::<Blank>(
294                     &provider.get_unstable()?,
295                 )?,
296             )))
297         }
298 
299         /// Get the `Cased` value for a given character, using compiled data
300         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
301         #[cfg(feature = "compiled_data")]
cased_for_char(ch: DiplomatChar) -> bool302         pub fn cased_for_char(ch: DiplomatChar) -> bool {
303             icu_properties::CodePointSetData::new::<Cased>().contains32(ch)
304         }
305         /// Create a set for the `Cased` property, using compiled data.
306         #[diplomat::rust_link(icu::properties::props::Cased, Struct)]
307         #[diplomat::attr(auto, named_constructor = "cased")]
308         #[cfg(feature = "compiled_data")]
create_cased() -> Box<CodePointSetData>309         pub fn create_cased() -> Box<CodePointSetData> {
310             Box::new(CodePointSetData(
311                 icu_properties::CodePointSetData::new::<Cased>().static_to_owned(),
312             ))
313         }
314 
315         /// Create a set for the `Cased` property, using a particular data source.
316         #[diplomat::rust_link(icu::properties::props::Cased, Struct)]
317         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "cased_with_provider")]
318         #[cfg(feature = "buffer_provider")]
create_cased_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>319         pub fn create_cased_with_provider(
320             provider: &DataProvider,
321         ) -> Result<Box<CodePointSetData>, DataError> {
322             Ok(Box::new(CodePointSetData(
323                 icu_properties::CodePointSetData::try_new_unstable::<Cased>(
324                     &provider.get_unstable()?,
325                 )?,
326             )))
327         }
328 
329         /// Get the `Case_Ignorable` value for a given character, using compiled data
330         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
331         #[cfg(feature = "compiled_data")]
case_ignorable_for_char(ch: DiplomatChar) -> bool332         pub fn case_ignorable_for_char(ch: DiplomatChar) -> bool {
333             icu_properties::CodePointSetData::new::<CaseIgnorable>().contains32(ch)
334         }
335         /// Create a set for the `Case_Ignorable` property, using compiled data.
336         #[diplomat::rust_link(icu::properties::props::CaseIgnorable, Struct)]
337         #[diplomat::attr(auto, named_constructor = "case_ignorable")]
338         #[cfg(feature = "compiled_data")]
create_case_ignorable() -> Box<CodePointSetData>339         pub fn create_case_ignorable() -> Box<CodePointSetData> {
340             Box::new(CodePointSetData(
341                 icu_properties::CodePointSetData::new::<CaseIgnorable>().static_to_owned(),
342             ))
343         }
344 
345         /// Create a set for the `Case_Ignorable` property, using a particular data source.
346         #[diplomat::rust_link(icu::properties::props::CaseIgnorable, Struct)]
347         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "case_ignorable_with_provider")]
348         #[cfg(feature = "buffer_provider")]
create_case_ignorable_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>349         pub fn create_case_ignorable_with_provider(
350             provider: &DataProvider,
351         ) -> Result<Box<CodePointSetData>, DataError> {
352             Ok(Box::new(CodePointSetData(
353                 icu_properties::CodePointSetData::try_new_unstable::<CaseIgnorable>(
354                     &provider.get_unstable()?,
355                 )?,
356             )))
357         }
358 
359         /// Get the `Full_Composition_Exclusion` value for a given character, using compiled data
360         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
361         #[cfg(feature = "compiled_data")]
full_composition_exclusion_for_char(ch: DiplomatChar) -> bool362         pub fn full_composition_exclusion_for_char(ch: DiplomatChar) -> bool {
363             icu_properties::CodePointSetData::new::<FullCompositionExclusion>().contains32(ch)
364         }
365         /// Create a set for the `Full_Composition_Exclusion` property, using compiled data.
366         #[diplomat::rust_link(icu::properties::props::FullCompositionExclusion, Struct)]
367         #[diplomat::attr(auto, named_constructor = "full_composition_exclusion")]
368         #[cfg(feature = "compiled_data")]
create_full_composition_exclusion() -> Box<CodePointSetData>369         pub fn create_full_composition_exclusion() -> Box<CodePointSetData> {
370             Box::new(CodePointSetData(
371                 icu_properties::CodePointSetData::new::<FullCompositionExclusion>()
372                     .static_to_owned(),
373             ))
374         }
375 
376         /// Create a set for the `Full_Composition_Exclusion` property, using a particular data source.
377         #[diplomat::rust_link(icu::properties::props::FullCompositionExclusion, Struct)]
378         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "full_composition_exclusion_with_provider")]
379         #[cfg(feature = "buffer_provider")]
create_full_composition_exclusion_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>380         pub fn create_full_composition_exclusion_with_provider(
381             provider: &DataProvider,
382         ) -> Result<Box<CodePointSetData>, DataError> {
383             Ok(Box::new(CodePointSetData(
384                 icu_properties::CodePointSetData::try_new_unstable::<FullCompositionExclusion>(
385                     &provider.get_unstable()?,
386                 )?,
387             )))
388         }
389 
390         /// Get the `Changes_When_Casefolded` value for a given character, using compiled data
391         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
392         #[cfg(feature = "compiled_data")]
changes_when_casefolded_for_char(ch: DiplomatChar) -> bool393         pub fn changes_when_casefolded_for_char(ch: DiplomatChar) -> bool {
394             icu_properties::CodePointSetData::new::<ChangesWhenCasefolded>().contains32(ch)
395         }
396         /// Create a set for the `Changes_When_Casefolded` property, using compiled data.
397         #[diplomat::rust_link(icu::properties::props::ChangesWhenCasefolded, Struct)]
398         #[diplomat::attr(auto, named_constructor = "changes_when_casefolded")]
399         #[cfg(feature = "compiled_data")]
create_changes_when_casefolded() -> Box<CodePointSetData>400         pub fn create_changes_when_casefolded() -> Box<CodePointSetData> {
401             Box::new(CodePointSetData(
402                 icu_properties::CodePointSetData::new::<ChangesWhenCasefolded>().static_to_owned(),
403             ))
404         }
405 
406         /// Create a set for the `Changes_When_Casefolded` property, using a particular data source.
407         #[diplomat::rust_link(icu::properties::props::ChangesWhenCasefolded, Struct)]
408         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "changes_when_casefolded_with_provider")]
409         #[cfg(feature = "buffer_provider")]
create_changes_when_casefolded_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>410         pub fn create_changes_when_casefolded_with_provider(
411             provider: &DataProvider,
412         ) -> Result<Box<CodePointSetData>, DataError> {
413             Ok(Box::new(CodePointSetData(
414                 icu_properties::CodePointSetData::try_new_unstable::<ChangesWhenCasefolded>(
415                     &provider.get_unstable()?,
416                 )?,
417             )))
418         }
419 
420         /// Get the `Changes_When_Casemapped` value for a given character, using compiled data
421         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
422         #[cfg(feature = "compiled_data")]
changes_when_casemapped_for_char(ch: DiplomatChar) -> bool423         pub fn changes_when_casemapped_for_char(ch: DiplomatChar) -> bool {
424             icu_properties::CodePointSetData::new::<ChangesWhenCasemapped>().contains32(ch)
425         }
426         /// Create a set for the `Changes_When_Casemapped` property, using compiled data.
427         #[diplomat::rust_link(icu::properties::props::ChangesWhenCasemapped, Struct)]
428         #[diplomat::attr(auto, named_constructor = "changes_when_casemapped")]
429         #[cfg(feature = "compiled_data")]
create_changes_when_casemapped() -> Box<CodePointSetData>430         pub fn create_changes_when_casemapped() -> Box<CodePointSetData> {
431             Box::new(CodePointSetData(
432                 icu_properties::CodePointSetData::new::<ChangesWhenCasemapped>().static_to_owned(),
433             ))
434         }
435 
436         /// Create a set for the `Changes_When_Casemapped` property, using a particular data source.
437         #[diplomat::rust_link(icu::properties::props::ChangesWhenCasemapped, Struct)]
438         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "changes_when_casemapped_with_provider")]
439         #[cfg(feature = "buffer_provider")]
create_changes_when_casemapped_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>440         pub fn create_changes_when_casemapped_with_provider(
441             provider: &DataProvider,
442         ) -> Result<Box<CodePointSetData>, DataError> {
443             Ok(Box::new(CodePointSetData(
444                 icu_properties::CodePointSetData::try_new_unstable::<ChangesWhenCasemapped>(
445                     &provider.get_unstable()?,
446                 )?,
447             )))
448         }
449 
450         /// Get the `Changes_When_Nfkc_Casefolded` value for a given character, using compiled data
451         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
452         #[cfg(feature = "compiled_data")]
changes_when_nfkc_casefolded_for_char(ch: DiplomatChar) -> bool453         pub fn changes_when_nfkc_casefolded_for_char(ch: DiplomatChar) -> bool {
454             icu_properties::CodePointSetData::new::<ChangesWhenNfkcCasefolded>().contains32(ch)
455         }
456         /// Create a set for the `Changes_When_Nfkc_Casefolded` property, using compiled data.
457         #[diplomat::rust_link(icu::properties::props::ChangesWhenNfkcCasefolded, Struct)]
458         #[diplomat::attr(auto, named_constructor = "changes_when_nfkc_casefolded")]
459         #[cfg(feature = "compiled_data")]
create_changes_when_nfkc_casefolded() -> Box<CodePointSetData>460         pub fn create_changes_when_nfkc_casefolded() -> Box<CodePointSetData> {
461             Box::new(CodePointSetData(
462                 icu_properties::CodePointSetData::new::<ChangesWhenNfkcCasefolded>()
463                     .static_to_owned(),
464             ))
465         }
466 
467         /// Create a set for the `Changes_When_Nfkc_Casefolded` property, using a particular data source.
468         #[diplomat::rust_link(icu::properties::props::ChangesWhenNfkcCasefolded, Struct)]
469         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "changes_when_nfkc_casefolded_with_provider")]
470         #[cfg(feature = "buffer_provider")]
create_changes_when_nfkc_casefolded_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>471         pub fn create_changes_when_nfkc_casefolded_with_provider(
472             provider: &DataProvider,
473         ) -> Result<Box<CodePointSetData>, DataError> {
474             Ok(Box::new(CodePointSetData(
475                 icu_properties::CodePointSetData::try_new_unstable::<ChangesWhenNfkcCasefolded>(
476                     &provider.get_unstable()?,
477                 )?,
478             )))
479         }
480 
481         /// Get the `Changes_When_Lowercased` value for a given character, using compiled data
482         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
483         #[cfg(feature = "compiled_data")]
changes_when_lowercased_for_char(ch: DiplomatChar) -> bool484         pub fn changes_when_lowercased_for_char(ch: DiplomatChar) -> bool {
485             icu_properties::CodePointSetData::new::<ChangesWhenLowercased>().contains32(ch)
486         }
487         /// Create a set for the `Changes_When_Lowercased` property, using compiled data.
488         #[diplomat::rust_link(icu::properties::props::ChangesWhenLowercased, Struct)]
489         #[diplomat::attr(auto, named_constructor = "changes_when_lowercased")]
490         #[cfg(feature = "compiled_data")]
create_changes_when_lowercased() -> Box<CodePointSetData>491         pub fn create_changes_when_lowercased() -> Box<CodePointSetData> {
492             Box::new(CodePointSetData(
493                 icu_properties::CodePointSetData::new::<ChangesWhenLowercased>().static_to_owned(),
494             ))
495         }
496 
497         /// Create a set for the `Changes_When_Lowercased` property, using a particular data source.
498         #[diplomat::rust_link(icu::properties::props::ChangesWhenLowercased, Struct)]
499         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "changes_when_lowercased_with_provider")]
500         #[cfg(feature = "buffer_provider")]
create_changes_when_lowercased_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>501         pub fn create_changes_when_lowercased_with_provider(
502             provider: &DataProvider,
503         ) -> Result<Box<CodePointSetData>, DataError> {
504             Ok(Box::new(CodePointSetData(
505                 icu_properties::CodePointSetData::try_new_unstable::<ChangesWhenLowercased>(
506                     &provider.get_unstable()?,
507                 )?,
508             )))
509         }
510 
511         /// Get the `Changes_When_Titlecased` value for a given character, using compiled data
512         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
513         #[cfg(feature = "compiled_data")]
changes_when_titlecased_for_char(ch: DiplomatChar) -> bool514         pub fn changes_when_titlecased_for_char(ch: DiplomatChar) -> bool {
515             icu_properties::CodePointSetData::new::<ChangesWhenTitlecased>().contains32(ch)
516         }
517         /// Create a set for the `Changes_When_Titlecased` property, using compiled data.
518         #[diplomat::rust_link(icu::properties::props::ChangesWhenTitlecased, Struct)]
519         #[diplomat::attr(auto, named_constructor = "changes_when_titlecased")]
520         #[cfg(feature = "compiled_data")]
create_changes_when_titlecased() -> Box<CodePointSetData>521         pub fn create_changes_when_titlecased() -> Box<CodePointSetData> {
522             Box::new(CodePointSetData(
523                 icu_properties::CodePointSetData::new::<ChangesWhenTitlecased>().static_to_owned(),
524             ))
525         }
526 
527         /// Create a set for the `Changes_When_Titlecased` property, using a particular data source.
528         #[diplomat::rust_link(icu::properties::props::ChangesWhenTitlecased, Struct)]
529         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "changes_when_titlecased_with_provider")]
530         #[cfg(feature = "buffer_provider")]
create_changes_when_titlecased_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>531         pub fn create_changes_when_titlecased_with_provider(
532             provider: &DataProvider,
533         ) -> Result<Box<CodePointSetData>, DataError> {
534             Ok(Box::new(CodePointSetData(
535                 icu_properties::CodePointSetData::try_new_unstable::<ChangesWhenTitlecased>(
536                     &provider.get_unstable()?,
537                 )?,
538             )))
539         }
540 
541         /// Get the `Changes_When_Uppercased` value for a given character, using compiled data
542         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
543         #[cfg(feature = "compiled_data")]
changes_when_uppercased_for_char(ch: DiplomatChar) -> bool544         pub fn changes_when_uppercased_for_char(ch: DiplomatChar) -> bool {
545             icu_properties::CodePointSetData::new::<ChangesWhenUppercased>().contains32(ch)
546         }
547         /// Create a set for the `Changes_When_Uppercased` property, using compiled data.
548         #[diplomat::rust_link(icu::properties::props::ChangesWhenUppercased, Struct)]
549         #[diplomat::attr(auto, named_constructor = "changes_when_uppercased")]
550         #[cfg(feature = "compiled_data")]
create_changes_when_uppercased() -> Box<CodePointSetData>551         pub fn create_changes_when_uppercased() -> Box<CodePointSetData> {
552             Box::new(CodePointSetData(
553                 icu_properties::CodePointSetData::new::<ChangesWhenUppercased>().static_to_owned(),
554             ))
555         }
556 
557         /// Create a set for the `Changes_When_Uppercased` property, using a particular data source.
558         #[diplomat::rust_link(icu::properties::props::ChangesWhenUppercased, Struct)]
559         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "changes_when_uppercased_with_provider")]
560         #[cfg(feature = "buffer_provider")]
create_changes_when_uppercased_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>561         pub fn create_changes_when_uppercased_with_provider(
562             provider: &DataProvider,
563         ) -> Result<Box<CodePointSetData>, DataError> {
564             Ok(Box::new(CodePointSetData(
565                 icu_properties::CodePointSetData::try_new_unstable::<ChangesWhenUppercased>(
566                     &provider.get_unstable()?,
567                 )?,
568             )))
569         }
570 
571         /// Get the `Dash` value for a given character, using compiled data
572         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
573         #[cfg(feature = "compiled_data")]
dash_for_char(ch: DiplomatChar) -> bool574         pub fn dash_for_char(ch: DiplomatChar) -> bool {
575             icu_properties::CodePointSetData::new::<Dash>().contains32(ch)
576         }
577         /// Create a set for the `Dash` property, using compiled data.
578         #[diplomat::rust_link(icu::properties::props::Dash, Struct)]
579         #[diplomat::attr(auto, named_constructor = "dash")]
580         #[cfg(feature = "compiled_data")]
create_dash() -> Box<CodePointSetData>581         pub fn create_dash() -> Box<CodePointSetData> {
582             Box::new(CodePointSetData(
583                 icu_properties::CodePointSetData::new::<Dash>().static_to_owned(),
584             ))
585         }
586 
587         /// Create a set for the `Dash` property, using a particular data source.
588         #[diplomat::rust_link(icu::properties::props::Dash, Struct)]
589         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "dash_with_provider")]
590         #[cfg(feature = "buffer_provider")]
create_dash_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>591         pub fn create_dash_with_provider(
592             provider: &DataProvider,
593         ) -> Result<Box<CodePointSetData>, DataError> {
594             Ok(Box::new(CodePointSetData(
595                 icu_properties::CodePointSetData::try_new_unstable::<Dash>(
596                     &provider.get_unstable()?,
597                 )?,
598             )))
599         }
600 
601         /// Get the `Deprecated` value for a given character, using compiled data
602         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
603         #[cfg(feature = "compiled_data")]
deprecated_for_char(ch: DiplomatChar) -> bool604         pub fn deprecated_for_char(ch: DiplomatChar) -> bool {
605             icu_properties::CodePointSetData::new::<Deprecated>().contains32(ch)
606         }
607         /// Create a set for the `Deprecated` property, using compiled data.
608         #[diplomat::rust_link(icu::properties::props::Deprecated, Struct)]
609         #[diplomat::attr(auto, named_constructor = "deprecated")]
610         #[cfg(feature = "compiled_data")]
create_deprecated() -> Box<CodePointSetData>611         pub fn create_deprecated() -> Box<CodePointSetData> {
612             Box::new(CodePointSetData(
613                 icu_properties::CodePointSetData::new::<Deprecated>().static_to_owned(),
614             ))
615         }
616 
617         /// Create a set for the `Deprecated` property, using a particular data source.
618         #[diplomat::rust_link(icu::properties::props::Deprecated, Struct)]
619         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "deprecated_with_provider")]
620         #[cfg(feature = "buffer_provider")]
create_deprecated_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>621         pub fn create_deprecated_with_provider(
622             provider: &DataProvider,
623         ) -> Result<Box<CodePointSetData>, DataError> {
624             Ok(Box::new(CodePointSetData(
625                 icu_properties::CodePointSetData::try_new_unstable::<Deprecated>(
626                     &provider.get_unstable()?,
627                 )?,
628             )))
629         }
630 
631         /// Get the `Default_Ignorable_Code_Point` value for a given character, using compiled data
632         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
633         #[cfg(feature = "compiled_data")]
default_ignorable_code_point_for_char(ch: DiplomatChar) -> bool634         pub fn default_ignorable_code_point_for_char(ch: DiplomatChar) -> bool {
635             icu_properties::CodePointSetData::new::<DefaultIgnorableCodePoint>().contains32(ch)
636         }
637         /// Create a set for the `Default_Ignorable_Code_Point` property, using compiled data.
638         #[diplomat::rust_link(icu::properties::props::DefaultIgnorableCodePoint, Struct)]
639         #[diplomat::attr(auto, named_constructor = "default_ignorable_code_point")]
640         #[cfg(feature = "compiled_data")]
create_default_ignorable_code_point() -> Box<CodePointSetData>641         pub fn create_default_ignorable_code_point() -> Box<CodePointSetData> {
642             Box::new(CodePointSetData(
643                 icu_properties::CodePointSetData::new::<DefaultIgnorableCodePoint>()
644                     .static_to_owned(),
645             ))
646         }
647 
648         /// Create a set for the `Default_Ignorable_Code_Point` property, using a particular data source.
649         #[diplomat::rust_link(icu::properties::props::DefaultIgnorableCodePoint, Struct)]
650         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "default_ignorable_code_point_with_provider")]
651         #[cfg(feature = "buffer_provider")]
create_default_ignorable_code_point_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>652         pub fn create_default_ignorable_code_point_with_provider(
653             provider: &DataProvider,
654         ) -> Result<Box<CodePointSetData>, DataError> {
655             Ok(Box::new(CodePointSetData(
656                 icu_properties::CodePointSetData::try_new_unstable::<DefaultIgnorableCodePoint>(
657                     &provider.get_unstable()?,
658                 )?,
659             )))
660         }
661 
662         /// Get the `Diacritic` value for a given character, using compiled data
663         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
664         #[cfg(feature = "compiled_data")]
diacritic_for_char(ch: DiplomatChar) -> bool665         pub fn diacritic_for_char(ch: DiplomatChar) -> bool {
666             icu_properties::CodePointSetData::new::<Diacritic>().contains32(ch)
667         }
668         /// Create a set for the `Diacritic` property, using compiled data.
669         #[diplomat::rust_link(icu::properties::props::Diacritic, Struct)]
670         #[diplomat::attr(auto, named_constructor = "diacritic")]
671         #[cfg(feature = "compiled_data")]
create_diacritic() -> Box<CodePointSetData>672         pub fn create_diacritic() -> Box<CodePointSetData> {
673             Box::new(CodePointSetData(
674                 icu_properties::CodePointSetData::new::<Diacritic>().static_to_owned(),
675             ))
676         }
677 
678         /// Create a set for the `Diacritic` property, using a particular data source.
679         #[diplomat::rust_link(icu::properties::props::Diacritic, Struct)]
680         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "diacritic_with_provider")]
681         #[cfg(feature = "buffer_provider")]
create_diacritic_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>682         pub fn create_diacritic_with_provider(
683             provider: &DataProvider,
684         ) -> Result<Box<CodePointSetData>, DataError> {
685             Ok(Box::new(CodePointSetData(
686                 icu_properties::CodePointSetData::try_new_unstable::<Diacritic>(
687                     &provider.get_unstable()?,
688                 )?,
689             )))
690         }
691 
692         /// Get the `Emoji_Modifier_Base` value for a given character, using compiled data
693         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
694         #[cfg(feature = "compiled_data")]
emoji_modifier_base_for_char(ch: DiplomatChar) -> bool695         pub fn emoji_modifier_base_for_char(ch: DiplomatChar) -> bool {
696             icu_properties::CodePointSetData::new::<EmojiModifierBase>().contains32(ch)
697         }
698         /// Create a set for the `Emoji_Modifier_Base` property, using compiled data.
699         #[diplomat::rust_link(icu::properties::props::EmojiModifierBase, Struct)]
700         #[diplomat::attr(auto, named_constructor = "emoji_modifier_base")]
701         #[cfg(feature = "compiled_data")]
create_emoji_modifier_base() -> Box<CodePointSetData>702         pub fn create_emoji_modifier_base() -> Box<CodePointSetData> {
703             Box::new(CodePointSetData(
704                 icu_properties::CodePointSetData::new::<EmojiModifierBase>().static_to_owned(),
705             ))
706         }
707 
708         /// Create a set for the `Emoji_Modifier_Base` property, using a particular data source.
709         #[diplomat::rust_link(icu::properties::props::EmojiModifierBase, Struct)]
710         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "emoji_modifier_base_with_provider")]
711         #[cfg(feature = "buffer_provider")]
create_emoji_modifier_base_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>712         pub fn create_emoji_modifier_base_with_provider(
713             provider: &DataProvider,
714         ) -> Result<Box<CodePointSetData>, DataError> {
715             Ok(Box::new(CodePointSetData(
716                 icu_properties::CodePointSetData::try_new_unstable::<EmojiModifierBase>(
717                     &provider.get_unstable()?,
718                 )?,
719             )))
720         }
721 
722         /// Get the `Emoji_Component` value for a given character, using compiled data
723         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
724         #[cfg(feature = "compiled_data")]
emoji_component_for_char(ch: DiplomatChar) -> bool725         pub fn emoji_component_for_char(ch: DiplomatChar) -> bool {
726             icu_properties::CodePointSetData::new::<EmojiComponent>().contains32(ch)
727         }
728         /// Create a set for the `Emoji_Component` property, using compiled data.
729         #[diplomat::rust_link(icu::properties::props::EmojiComponent, Struct)]
730         #[diplomat::attr(auto, named_constructor = "emoji_component")]
731         #[cfg(feature = "compiled_data")]
create_emoji_component() -> Box<CodePointSetData>732         pub fn create_emoji_component() -> Box<CodePointSetData> {
733             Box::new(CodePointSetData(
734                 icu_properties::CodePointSetData::new::<EmojiComponent>().static_to_owned(),
735             ))
736         }
737 
738         /// Create a set for the `Emoji_Component` property, using a particular data source.
739         #[diplomat::rust_link(icu::properties::props::EmojiComponent, Struct)]
740         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "emoji_component_with_provider")]
741         #[cfg(feature = "buffer_provider")]
create_emoji_component_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>742         pub fn create_emoji_component_with_provider(
743             provider: &DataProvider,
744         ) -> Result<Box<CodePointSetData>, DataError> {
745             Ok(Box::new(CodePointSetData(
746                 icu_properties::CodePointSetData::try_new_unstable::<EmojiComponent>(
747                     &provider.get_unstable()?,
748                 )?,
749             )))
750         }
751 
752         /// Get the `Emoji_Modifier` value for a given character, using compiled data
753         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
754         #[cfg(feature = "compiled_data")]
emoji_modifier_for_char(ch: DiplomatChar) -> bool755         pub fn emoji_modifier_for_char(ch: DiplomatChar) -> bool {
756             icu_properties::CodePointSetData::new::<EmojiModifier>().contains32(ch)
757         }
758         /// Create a set for the `Emoji_Modifier` property, using compiled data.
759         #[diplomat::rust_link(icu::properties::props::EmojiModifier, Struct)]
760         #[diplomat::attr(auto, named_constructor = "emoji_modifier")]
761         #[cfg(feature = "compiled_data")]
create_emoji_modifier() -> Box<CodePointSetData>762         pub fn create_emoji_modifier() -> Box<CodePointSetData> {
763             Box::new(CodePointSetData(
764                 icu_properties::CodePointSetData::new::<EmojiModifier>().static_to_owned(),
765             ))
766         }
767 
768         /// Create a set for the `Emoji_Modifier` property, using a particular data source.
769         #[diplomat::rust_link(icu::properties::props::EmojiModifier, Struct)]
770         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "emoji_modifier_with_provider")]
771         #[cfg(feature = "buffer_provider")]
create_emoji_modifier_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>772         pub fn create_emoji_modifier_with_provider(
773             provider: &DataProvider,
774         ) -> Result<Box<CodePointSetData>, DataError> {
775             Ok(Box::new(CodePointSetData(
776                 icu_properties::CodePointSetData::try_new_unstable::<EmojiModifier>(
777                     &provider.get_unstable()?,
778                 )?,
779             )))
780         }
781 
782         /// Get the `Emoji` value for a given character, using compiled data
783         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
784         #[cfg(feature = "compiled_data")]
emoji_for_char(ch: DiplomatChar) -> bool785         pub fn emoji_for_char(ch: DiplomatChar) -> bool {
786             icu_properties::CodePointSetData::new::<Emoji>().contains32(ch)
787         }
788         /// Create a set for the `Emoji` property, using compiled data.
789         #[diplomat::rust_link(icu::properties::props::Emoji, Struct)]
790         #[diplomat::attr(auto, named_constructor = "emoji")]
791         #[cfg(feature = "compiled_data")]
create_emoji() -> Box<CodePointSetData>792         pub fn create_emoji() -> Box<CodePointSetData> {
793             Box::new(CodePointSetData(
794                 icu_properties::CodePointSetData::new::<Emoji>().static_to_owned(),
795             ))
796         }
797 
798         /// Create a set for the `Emoji` property, using a particular data source.
799         #[diplomat::rust_link(icu::properties::props::Emoji, Struct)]
800         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "emoji_with_provider")]
801         #[cfg(feature = "buffer_provider")]
create_emoji_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>802         pub fn create_emoji_with_provider(
803             provider: &DataProvider,
804         ) -> Result<Box<CodePointSetData>, DataError> {
805             Ok(Box::new(CodePointSetData(
806                 icu_properties::CodePointSetData::try_new_unstable::<Emoji>(
807                     &provider.get_unstable()?,
808                 )?,
809             )))
810         }
811 
812         /// Get the `Emoji_Presentation` value for a given character, using compiled data
813         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
814         #[cfg(feature = "compiled_data")]
emoji_presentation_for_char(ch: DiplomatChar) -> bool815         pub fn emoji_presentation_for_char(ch: DiplomatChar) -> bool {
816             icu_properties::CodePointSetData::new::<EmojiPresentation>().contains32(ch)
817         }
818         /// Create a set for the `Emoji_Presentation` property, using compiled data.
819         #[diplomat::rust_link(icu::properties::props::EmojiPresentation, Struct)]
820         #[diplomat::attr(auto, named_constructor = "emoji_presentation")]
821         #[cfg(feature = "compiled_data")]
create_emoji_presentation() -> Box<CodePointSetData>822         pub fn create_emoji_presentation() -> Box<CodePointSetData> {
823             Box::new(CodePointSetData(
824                 icu_properties::CodePointSetData::new::<EmojiPresentation>().static_to_owned(),
825             ))
826         }
827 
828         /// Create a set for the `Emoji_Presentation` property, using a particular data source.
829         #[diplomat::rust_link(icu::properties::props::EmojiPresentation, Struct)]
830         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "emoji_presentation_with_provider")]
831         #[cfg(feature = "buffer_provider")]
create_emoji_presentation_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>832         pub fn create_emoji_presentation_with_provider(
833             provider: &DataProvider,
834         ) -> Result<Box<CodePointSetData>, DataError> {
835             Ok(Box::new(CodePointSetData(
836                 icu_properties::CodePointSetData::try_new_unstable::<EmojiPresentation>(
837                     &provider.get_unstable()?,
838                 )?,
839             )))
840         }
841 
842         /// Get the `Extender` value for a given character, using compiled data
843         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
844         #[cfg(feature = "compiled_data")]
extender_for_char(ch: DiplomatChar) -> bool845         pub fn extender_for_char(ch: DiplomatChar) -> bool {
846             icu_properties::CodePointSetData::new::<Extender>().contains32(ch)
847         }
848         /// Create a set for the `Extender` property, using compiled data.
849         #[diplomat::rust_link(icu::properties::props::Extender, Struct)]
850         #[diplomat::attr(auto, named_constructor = "extender")]
851         #[cfg(feature = "compiled_data")]
create_extender() -> Box<CodePointSetData>852         pub fn create_extender() -> Box<CodePointSetData> {
853             Box::new(CodePointSetData(
854                 icu_properties::CodePointSetData::new::<Extender>().static_to_owned(),
855             ))
856         }
857 
858         /// Create a set for the `Extender` property, using a particular data source.
859         #[diplomat::rust_link(icu::properties::props::Extender, Struct)]
860         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "extender_with_provider")]
861         #[cfg(feature = "buffer_provider")]
create_extender_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>862         pub fn create_extender_with_provider(
863             provider: &DataProvider,
864         ) -> Result<Box<CodePointSetData>, DataError> {
865             Ok(Box::new(CodePointSetData(
866                 icu_properties::CodePointSetData::try_new_unstable::<Extender>(
867                     &provider.get_unstable()?,
868                 )?,
869             )))
870         }
871 
872         /// Get the `Extended_Pictographic` value for a given character, using compiled data
873         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
874         #[cfg(feature = "compiled_data")]
extended_pictographic_for_char(ch: DiplomatChar) -> bool875         pub fn extended_pictographic_for_char(ch: DiplomatChar) -> bool {
876             icu_properties::CodePointSetData::new::<ExtendedPictographic>().contains32(ch)
877         }
878         /// Create a set for the `Extended_Pictographic` property, using compiled data.
879         #[diplomat::rust_link(icu::properties::props::ExtendedPictographic, Struct)]
880         #[diplomat::attr(auto, named_constructor = "extended_pictographic")]
881         #[cfg(feature = "compiled_data")]
create_extended_pictographic() -> Box<CodePointSetData>882         pub fn create_extended_pictographic() -> Box<CodePointSetData> {
883             Box::new(CodePointSetData(
884                 icu_properties::CodePointSetData::new::<ExtendedPictographic>().static_to_owned(),
885             ))
886         }
887 
888         /// Create a set for the `Extended_Pictographic` property, using a particular data source.
889         #[diplomat::rust_link(icu::properties::props::ExtendedPictographic, Struct)]
890         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "extended_pictographic_with_provider")]
891         #[cfg(feature = "buffer_provider")]
create_extended_pictographic_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>892         pub fn create_extended_pictographic_with_provider(
893             provider: &DataProvider,
894         ) -> Result<Box<CodePointSetData>, DataError> {
895             Ok(Box::new(CodePointSetData(
896                 icu_properties::CodePointSetData::try_new_unstable::<ExtendedPictographic>(
897                     &provider.get_unstable()?,
898                 )?,
899             )))
900         }
901 
902         /// Get the `Graph` value for a given character, using compiled data
903         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
904         #[cfg(feature = "compiled_data")]
graph_for_char(ch: DiplomatChar) -> bool905         pub fn graph_for_char(ch: DiplomatChar) -> bool {
906             icu_properties::CodePointSetData::new::<Graph>().contains32(ch)
907         }
908         /// Create a set for the `Graph` property, using compiled data.
909         #[diplomat::rust_link(icu::properties::props::Graph, Struct)]
910         #[diplomat::attr(auto, named_constructor = "graph")]
911         #[cfg(feature = "compiled_data")]
create_graph() -> Box<CodePointSetData>912         pub fn create_graph() -> Box<CodePointSetData> {
913             Box::new(CodePointSetData(
914                 icu_properties::CodePointSetData::new::<Graph>().static_to_owned(),
915             ))
916         }
917 
918         /// Create a set for the `Graph` property, using a particular data source.
919         #[diplomat::rust_link(icu::properties::props::Graph, Struct)]
920         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "graph_with_provider")]
921         #[cfg(feature = "buffer_provider")]
create_graph_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>922         pub fn create_graph_with_provider(
923             provider: &DataProvider,
924         ) -> Result<Box<CodePointSetData>, DataError> {
925             Ok(Box::new(CodePointSetData(
926                 icu_properties::CodePointSetData::try_new_unstable::<Graph>(
927                     &provider.get_unstable()?,
928                 )?,
929             )))
930         }
931 
932         /// Get the `Grapheme_Base` value for a given character, using compiled data
933         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
934         #[cfg(feature = "compiled_data")]
grapheme_base_for_char(ch: DiplomatChar) -> bool935         pub fn grapheme_base_for_char(ch: DiplomatChar) -> bool {
936             icu_properties::CodePointSetData::new::<GraphemeBase>().contains32(ch)
937         }
938         /// Create a set for the `Grapheme_Base` property, using compiled data.
939         #[diplomat::rust_link(icu::properties::props::GraphemeBase, Struct)]
940         #[diplomat::attr(auto, named_constructor = "grapheme_base")]
941         #[cfg(feature = "compiled_data")]
create_grapheme_base() -> Box<CodePointSetData>942         pub fn create_grapheme_base() -> Box<CodePointSetData> {
943             Box::new(CodePointSetData(
944                 icu_properties::CodePointSetData::new::<GraphemeBase>().static_to_owned(),
945             ))
946         }
947 
948         /// Create a set for the `Grapheme_Base` property, using a particular data source.
949         #[diplomat::rust_link(icu::properties::props::GraphemeBase, Struct)]
950         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "grapheme_base_with_provider")]
951         #[cfg(feature = "buffer_provider")]
create_grapheme_base_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>952         pub fn create_grapheme_base_with_provider(
953             provider: &DataProvider,
954         ) -> Result<Box<CodePointSetData>, DataError> {
955             Ok(Box::new(CodePointSetData(
956                 icu_properties::CodePointSetData::try_new_unstable::<GraphemeBase>(
957                     &provider.get_unstable()?,
958                 )?,
959             )))
960         }
961 
962         /// Get the `Grapheme_Extend` value for a given character, using compiled data
963         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
964         #[cfg(feature = "compiled_data")]
grapheme_extend_for_char(ch: DiplomatChar) -> bool965         pub fn grapheme_extend_for_char(ch: DiplomatChar) -> bool {
966             icu_properties::CodePointSetData::new::<GraphemeExtend>().contains32(ch)
967         }
968         /// Create a set for the `Grapheme_Extend` property, using compiled data.
969         #[diplomat::rust_link(icu::properties::props::GraphemeExtend, Struct)]
970         #[diplomat::attr(auto, named_constructor = "grapheme_extend")]
971         #[cfg(feature = "compiled_data")]
create_grapheme_extend() -> Box<CodePointSetData>972         pub fn create_grapheme_extend() -> Box<CodePointSetData> {
973             Box::new(CodePointSetData(
974                 icu_properties::CodePointSetData::new::<GraphemeExtend>().static_to_owned(),
975             ))
976         }
977 
978         /// Create a set for the `Grapheme_Extend` property, using a particular data source.
979         #[diplomat::rust_link(icu::properties::props::GraphemeExtend, Struct)]
980         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "grapheme_extend_with_provider")]
981         #[cfg(feature = "buffer_provider")]
create_grapheme_extend_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>982         pub fn create_grapheme_extend_with_provider(
983             provider: &DataProvider,
984         ) -> Result<Box<CodePointSetData>, DataError> {
985             Ok(Box::new(CodePointSetData(
986                 icu_properties::CodePointSetData::try_new_unstable::<GraphemeExtend>(
987                     &provider.get_unstable()?,
988                 )?,
989             )))
990         }
991 
992         /// Get the `Grapheme_Link` value for a given character, using compiled data
993         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
994         #[cfg(feature = "compiled_data")]
grapheme_link_for_char(ch: DiplomatChar) -> bool995         pub fn grapheme_link_for_char(ch: DiplomatChar) -> bool {
996             icu_properties::CodePointSetData::new::<GraphemeLink>().contains32(ch)
997         }
998         /// Create a set for the `Grapheme_Link` property, using compiled data.
999         #[diplomat::rust_link(icu::properties::props::GraphemeLink, Struct)]
1000         #[diplomat::attr(auto, named_constructor = "grapheme_link")]
1001         #[cfg(feature = "compiled_data")]
create_grapheme_link() -> Box<CodePointSetData>1002         pub fn create_grapheme_link() -> Box<CodePointSetData> {
1003             Box::new(CodePointSetData(
1004                 icu_properties::CodePointSetData::new::<GraphemeLink>().static_to_owned(),
1005             ))
1006         }
1007 
1008         /// Create a set for the `Grapheme_Link` property, using a particular data source.
1009         #[diplomat::rust_link(icu::properties::props::GraphemeLink, Struct)]
1010         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "grapheme_link_with_provider")]
1011         #[cfg(feature = "buffer_provider")]
create_grapheme_link_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1012         pub fn create_grapheme_link_with_provider(
1013             provider: &DataProvider,
1014         ) -> Result<Box<CodePointSetData>, DataError> {
1015             Ok(Box::new(CodePointSetData(
1016                 icu_properties::CodePointSetData::try_new_unstable::<GraphemeLink>(
1017                     &provider.get_unstable()?,
1018                 )?,
1019             )))
1020         }
1021 
1022         /// Get the `Hex_Digit` value for a given character, using compiled data
1023         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1024         #[cfg(feature = "compiled_data")]
hex_digit_for_char(ch: DiplomatChar) -> bool1025         pub fn hex_digit_for_char(ch: DiplomatChar) -> bool {
1026             icu_properties::CodePointSetData::new::<HexDigit>().contains32(ch)
1027         }
1028         /// Create a set for the `Hex_Digit` property, using compiled data.
1029         #[diplomat::rust_link(icu::properties::props::HexDigit, Struct)]
1030         #[diplomat::attr(auto, named_constructor = "hex_digit")]
1031         #[cfg(feature = "compiled_data")]
create_hex_digit() -> Box<CodePointSetData>1032         pub fn create_hex_digit() -> Box<CodePointSetData> {
1033             Box::new(CodePointSetData(
1034                 icu_properties::CodePointSetData::new::<HexDigit>().static_to_owned(),
1035             ))
1036         }
1037 
1038         /// Create a set for the `Hex_Digit` property, using a particular data source.
1039         #[diplomat::rust_link(icu::properties::props::HexDigit, Struct)]
1040         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "hex_digit_with_provider")]
1041         #[cfg(feature = "buffer_provider")]
create_hex_digit_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1042         pub fn create_hex_digit_with_provider(
1043             provider: &DataProvider,
1044         ) -> Result<Box<CodePointSetData>, DataError> {
1045             Ok(Box::new(CodePointSetData(
1046                 icu_properties::CodePointSetData::try_new_unstable::<HexDigit>(
1047                     &provider.get_unstable()?,
1048                 )?,
1049             )))
1050         }
1051 
1052         /// Get the `Hyphen` value for a given character, using compiled data
1053         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1054         #[cfg(feature = "compiled_data")]
hyphen_for_char(ch: DiplomatChar) -> bool1055         pub fn hyphen_for_char(ch: DiplomatChar) -> bool {
1056             icu_properties::CodePointSetData::new::<Hyphen>().contains32(ch)
1057         }
1058         /// Create a set for the `Hyphen` property, using compiled data.
1059         #[diplomat::rust_link(icu::properties::props::Hyphen, Struct)]
1060         #[diplomat::attr(auto, named_constructor = "hyphen")]
1061         #[cfg(feature = "compiled_data")]
create_hyphen() -> Box<CodePointSetData>1062         pub fn create_hyphen() -> Box<CodePointSetData> {
1063             Box::new(CodePointSetData(
1064                 icu_properties::CodePointSetData::new::<Hyphen>().static_to_owned(),
1065             ))
1066         }
1067 
1068         /// Create a set for the `Hyphen` property, using a particular data source.
1069         #[diplomat::rust_link(icu::properties::props::Hyphen, Struct)]
1070         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "hyphen_with_provider")]
1071         #[cfg(feature = "buffer_provider")]
create_hyphen_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1072         pub fn create_hyphen_with_provider(
1073             provider: &DataProvider,
1074         ) -> Result<Box<CodePointSetData>, DataError> {
1075             Ok(Box::new(CodePointSetData(
1076                 icu_properties::CodePointSetData::try_new_unstable::<Hyphen>(
1077                     &provider.get_unstable()?,
1078                 )?,
1079             )))
1080         }
1081 
1082         /// Get the `Id_Continue` value for a given character, using compiled data
1083         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1084         #[cfg(feature = "compiled_data")]
id_continue_for_char(ch: DiplomatChar) -> bool1085         pub fn id_continue_for_char(ch: DiplomatChar) -> bool {
1086             icu_properties::CodePointSetData::new::<IdContinue>().contains32(ch)
1087         }
1088         /// Create a set for the `Id_Continue` property, using compiled data.
1089         #[diplomat::rust_link(icu::properties::props::IdContinue, Struct)]
1090         #[diplomat::attr(auto, named_constructor = "id_continue")]
1091         #[cfg(feature = "compiled_data")]
create_id_continue() -> Box<CodePointSetData>1092         pub fn create_id_continue() -> Box<CodePointSetData> {
1093             Box::new(CodePointSetData(
1094                 icu_properties::CodePointSetData::new::<IdContinue>().static_to_owned(),
1095             ))
1096         }
1097 
1098         /// Create a set for the `Id_Continue` property, using a particular data source.
1099         #[diplomat::rust_link(icu::properties::props::IdContinue, Struct)]
1100         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "id_continue_with_provider")]
1101         #[cfg(feature = "buffer_provider")]
create_id_continue_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1102         pub fn create_id_continue_with_provider(
1103             provider: &DataProvider,
1104         ) -> Result<Box<CodePointSetData>, DataError> {
1105             Ok(Box::new(CodePointSetData(
1106                 icu_properties::CodePointSetData::try_new_unstable::<IdContinue>(
1107                     &provider.get_unstable()?,
1108                 )?,
1109             )))
1110         }
1111 
1112         /// Get the `Ideographic` value for a given character, using compiled data
1113         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1114         #[cfg(feature = "compiled_data")]
ideographic_for_char(ch: DiplomatChar) -> bool1115         pub fn ideographic_for_char(ch: DiplomatChar) -> bool {
1116             icu_properties::CodePointSetData::new::<Ideographic>().contains32(ch)
1117         }
1118         /// Create a set for the `Ideographic` property, using compiled data.
1119         #[diplomat::rust_link(icu::properties::props::Ideographic, Struct)]
1120         #[diplomat::attr(auto, named_constructor = "ideographic")]
1121         #[cfg(feature = "compiled_data")]
create_ideographic() -> Box<CodePointSetData>1122         pub fn create_ideographic() -> Box<CodePointSetData> {
1123             Box::new(CodePointSetData(
1124                 icu_properties::CodePointSetData::new::<Ideographic>().static_to_owned(),
1125             ))
1126         }
1127 
1128         /// Create a set for the `Ideographic` property, using a particular data source.
1129         #[diplomat::rust_link(icu::properties::props::Ideographic, Struct)]
1130         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "ideographic_with_provider")]
1131         #[cfg(feature = "buffer_provider")]
create_ideographic_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1132         pub fn create_ideographic_with_provider(
1133             provider: &DataProvider,
1134         ) -> Result<Box<CodePointSetData>, DataError> {
1135             Ok(Box::new(CodePointSetData(
1136                 icu_properties::CodePointSetData::try_new_unstable::<Ideographic>(
1137                     &provider.get_unstable()?,
1138                 )?,
1139             )))
1140         }
1141 
1142         /// Get the `Id_Start` value for a given character, using compiled data
1143         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1144         #[cfg(feature = "compiled_data")]
id_start_for_char(ch: DiplomatChar) -> bool1145         pub fn id_start_for_char(ch: DiplomatChar) -> bool {
1146             icu_properties::CodePointSetData::new::<IdStart>().contains32(ch)
1147         }
1148         /// Create a set for the `Id_Start` property, using compiled data.
1149         #[diplomat::rust_link(icu::properties::props::IdStart, Struct)]
1150         #[diplomat::attr(auto, named_constructor = "id_start")]
1151         #[cfg(feature = "compiled_data")]
create_id_start() -> Box<CodePointSetData>1152         pub fn create_id_start() -> Box<CodePointSetData> {
1153             Box::new(CodePointSetData(
1154                 icu_properties::CodePointSetData::new::<IdStart>().static_to_owned(),
1155             ))
1156         }
1157 
1158         /// Create a set for the `Id_Start` property, using a particular data source.
1159         #[diplomat::rust_link(icu::properties::props::IdStart, Struct)]
1160         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "id_start_with_provider")]
1161         #[cfg(feature = "buffer_provider")]
create_id_start_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1162         pub fn create_id_start_with_provider(
1163             provider: &DataProvider,
1164         ) -> Result<Box<CodePointSetData>, DataError> {
1165             Ok(Box::new(CodePointSetData(
1166                 icu_properties::CodePointSetData::try_new_unstable::<IdStart>(
1167                     &provider.get_unstable()?,
1168                 )?,
1169             )))
1170         }
1171 
1172         /// Get the `Ids_Binary_Operator` value for a given character, using compiled data
1173         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1174         #[cfg(feature = "compiled_data")]
ids_binary_operator_for_char(ch: DiplomatChar) -> bool1175         pub fn ids_binary_operator_for_char(ch: DiplomatChar) -> bool {
1176             icu_properties::CodePointSetData::new::<IdsBinaryOperator>().contains32(ch)
1177         }
1178         /// Create a set for the `Ids_Binary_Operator` property, using compiled data.
1179         #[diplomat::rust_link(icu::properties::props::IdsBinaryOperator, Struct)]
1180         #[diplomat::attr(auto, named_constructor = "ids_binary_operator")]
1181         #[cfg(feature = "compiled_data")]
create_ids_binary_operator() -> Box<CodePointSetData>1182         pub fn create_ids_binary_operator() -> Box<CodePointSetData> {
1183             Box::new(CodePointSetData(
1184                 icu_properties::CodePointSetData::new::<IdsBinaryOperator>().static_to_owned(),
1185             ))
1186         }
1187 
1188         /// Create a set for the `Ids_Binary_Operator` property, using a particular data source.
1189         #[diplomat::rust_link(icu::properties::props::IdsBinaryOperator, Struct)]
1190         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "ids_binary_operator_with_provider")]
1191         #[cfg(feature = "buffer_provider")]
create_ids_binary_operator_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1192         pub fn create_ids_binary_operator_with_provider(
1193             provider: &DataProvider,
1194         ) -> Result<Box<CodePointSetData>, DataError> {
1195             Ok(Box::new(CodePointSetData(
1196                 icu_properties::CodePointSetData::try_new_unstable::<IdsBinaryOperator>(
1197                     &provider.get_unstable()?,
1198                 )?,
1199             )))
1200         }
1201 
1202         /// Get the `Ids_Trinary_Operator` value for a given character, using compiled data
1203         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1204         #[cfg(feature = "compiled_data")]
ids_trinary_operator_for_char(ch: DiplomatChar) -> bool1205         pub fn ids_trinary_operator_for_char(ch: DiplomatChar) -> bool {
1206             icu_properties::CodePointSetData::new::<IdsTrinaryOperator>().contains32(ch)
1207         }
1208         /// Create a set for the `Ids_Trinary_Operator` property, using compiled data.
1209         #[diplomat::rust_link(icu::properties::props::IdsTrinaryOperator, Struct)]
1210         #[diplomat::attr(auto, named_constructor = "ids_trinary_operator")]
1211         #[cfg(feature = "compiled_data")]
create_ids_trinary_operator() -> Box<CodePointSetData>1212         pub fn create_ids_trinary_operator() -> Box<CodePointSetData> {
1213             Box::new(CodePointSetData(
1214                 icu_properties::CodePointSetData::new::<IdsTrinaryOperator>().static_to_owned(),
1215             ))
1216         }
1217 
1218         /// Create a set for the `Ids_Trinary_Operator` property, using a particular data source.
1219         #[diplomat::rust_link(icu::properties::props::IdsTrinaryOperator, Struct)]
1220         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "ids_trinary_operator_with_provider")]
1221         #[cfg(feature = "buffer_provider")]
create_ids_trinary_operator_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1222         pub fn create_ids_trinary_operator_with_provider(
1223             provider: &DataProvider,
1224         ) -> Result<Box<CodePointSetData>, DataError> {
1225             Ok(Box::new(CodePointSetData(
1226                 icu_properties::CodePointSetData::try_new_unstable::<IdsTrinaryOperator>(
1227                     &provider.get_unstable()?,
1228                 )?,
1229             )))
1230         }
1231 
1232         /// Get the `Join_Control` value for a given character, using compiled data
1233         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1234         #[cfg(feature = "compiled_data")]
join_control_for_char(ch: DiplomatChar) -> bool1235         pub fn join_control_for_char(ch: DiplomatChar) -> bool {
1236             icu_properties::CodePointSetData::new::<JoinControl>().contains32(ch)
1237         }
1238         /// Create a set for the `Join_Control` property, using compiled data.
1239         #[diplomat::rust_link(icu::properties::props::JoinControl, Struct)]
1240         #[diplomat::attr(auto, named_constructor = "join_control")]
1241         #[cfg(feature = "compiled_data")]
create_join_control() -> Box<CodePointSetData>1242         pub fn create_join_control() -> Box<CodePointSetData> {
1243             Box::new(CodePointSetData(
1244                 icu_properties::CodePointSetData::new::<JoinControl>().static_to_owned(),
1245             ))
1246         }
1247 
1248         /// Create a set for the `Join_Control` property, using a particular data source.
1249         #[diplomat::rust_link(icu::properties::props::JoinControl, Struct)]
1250         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "join_control_with_provider")]
1251         #[cfg(feature = "buffer_provider")]
create_join_control_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1252         pub fn create_join_control_with_provider(
1253             provider: &DataProvider,
1254         ) -> Result<Box<CodePointSetData>, DataError> {
1255             Ok(Box::new(CodePointSetData(
1256                 icu_properties::CodePointSetData::try_new_unstable::<JoinControl>(
1257                     &provider.get_unstable()?,
1258                 )?,
1259             )))
1260         }
1261 
1262         /// Get the `Logical_Order_Exception` value for a given character, using compiled data
1263         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1264         #[cfg(feature = "compiled_data")]
logical_order_exception_for_char(ch: DiplomatChar) -> bool1265         pub fn logical_order_exception_for_char(ch: DiplomatChar) -> bool {
1266             icu_properties::CodePointSetData::new::<LogicalOrderException>().contains32(ch)
1267         }
1268         /// Create a set for the `Logical_Order_Exception` property, using compiled data.
1269         #[diplomat::rust_link(icu::properties::props::LogicalOrderException, Struct)]
1270         #[diplomat::attr(auto, named_constructor = "logical_order_exception")]
1271         #[cfg(feature = "compiled_data")]
create_logical_order_exception() -> Box<CodePointSetData>1272         pub fn create_logical_order_exception() -> Box<CodePointSetData> {
1273             Box::new(CodePointSetData(
1274                 icu_properties::CodePointSetData::new::<LogicalOrderException>().static_to_owned(),
1275             ))
1276         }
1277 
1278         /// Create a set for the `Logical_Order_Exception` property, using a particular data source.
1279         #[diplomat::rust_link(icu::properties::props::LogicalOrderException, Struct)]
1280         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "logical_order_exception_with_provider")]
1281         #[cfg(feature = "buffer_provider")]
create_logical_order_exception_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1282         pub fn create_logical_order_exception_with_provider(
1283             provider: &DataProvider,
1284         ) -> Result<Box<CodePointSetData>, DataError> {
1285             Ok(Box::new(CodePointSetData(
1286                 icu_properties::CodePointSetData::try_new_unstable::<LogicalOrderException>(
1287                     &provider.get_unstable()?,
1288                 )?,
1289             )))
1290         }
1291 
1292         /// Get the `Lowercase` value for a given character, using compiled data
1293         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1294         #[cfg(feature = "compiled_data")]
lowercase_for_char(ch: DiplomatChar) -> bool1295         pub fn lowercase_for_char(ch: DiplomatChar) -> bool {
1296             icu_properties::CodePointSetData::new::<Lowercase>().contains32(ch)
1297         }
1298         /// Create a set for the `Lowercase` property, using compiled data.
1299         #[diplomat::rust_link(icu::properties::props::Lowercase, Struct)]
1300         #[diplomat::attr(auto, named_constructor = "lowercase")]
1301         #[cfg(feature = "compiled_data")]
create_lowercase() -> Box<CodePointSetData>1302         pub fn create_lowercase() -> Box<CodePointSetData> {
1303             Box::new(CodePointSetData(
1304                 icu_properties::CodePointSetData::new::<Lowercase>().static_to_owned(),
1305             ))
1306         }
1307 
1308         /// Create a set for the `Lowercase` property, using a particular data source.
1309         #[diplomat::rust_link(icu::properties::props::Lowercase, Struct)]
1310         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "lowercase_with_provider")]
1311         #[cfg(feature = "buffer_provider")]
create_lowercase_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1312         pub fn create_lowercase_with_provider(
1313             provider: &DataProvider,
1314         ) -> Result<Box<CodePointSetData>, DataError> {
1315             Ok(Box::new(CodePointSetData(
1316                 icu_properties::CodePointSetData::try_new_unstable::<Lowercase>(
1317                     &provider.get_unstable()?,
1318                 )?,
1319             )))
1320         }
1321 
1322         /// Get the `Math` value for a given character, using compiled data
1323         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1324         #[cfg(feature = "compiled_data")]
math_for_char(ch: DiplomatChar) -> bool1325         pub fn math_for_char(ch: DiplomatChar) -> bool {
1326             icu_properties::CodePointSetData::new::<Math>().contains32(ch)
1327         }
1328         /// Create a set for the `Math` property, using compiled data.
1329         #[diplomat::rust_link(icu::properties::props::Math, Struct)]
1330         #[diplomat::attr(auto, named_constructor = "math")]
1331         #[cfg(feature = "compiled_data")]
create_math() -> Box<CodePointSetData>1332         pub fn create_math() -> Box<CodePointSetData> {
1333             Box::new(CodePointSetData(
1334                 icu_properties::CodePointSetData::new::<Math>().static_to_owned(),
1335             ))
1336         }
1337 
1338         /// Create a set for the `Math` property, using a particular data source.
1339         #[diplomat::rust_link(icu::properties::props::Math, Struct)]
1340         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "math_with_provider")]
1341         #[cfg(feature = "buffer_provider")]
create_math_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1342         pub fn create_math_with_provider(
1343             provider: &DataProvider,
1344         ) -> Result<Box<CodePointSetData>, DataError> {
1345             Ok(Box::new(CodePointSetData(
1346                 icu_properties::CodePointSetData::try_new_unstable::<Math>(
1347                     &provider.get_unstable()?,
1348                 )?,
1349             )))
1350         }
1351 
1352         /// Get the `Noncharacter_Code_Point` value for a given character, using compiled data
1353         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1354         #[cfg(feature = "compiled_data")]
noncharacter_code_point_for_char(ch: DiplomatChar) -> bool1355         pub fn noncharacter_code_point_for_char(ch: DiplomatChar) -> bool {
1356             icu_properties::CodePointSetData::new::<NoncharacterCodePoint>().contains32(ch)
1357         }
1358         /// Create a set for the `Noncharacter_Code_Point` property, using compiled data.
1359         #[diplomat::rust_link(icu::properties::props::NoncharacterCodePoint, Struct)]
1360         #[diplomat::attr(auto, named_constructor = "noncharacter_code_point")]
1361         #[cfg(feature = "compiled_data")]
create_noncharacter_code_point() -> Box<CodePointSetData>1362         pub fn create_noncharacter_code_point() -> Box<CodePointSetData> {
1363             Box::new(CodePointSetData(
1364                 icu_properties::CodePointSetData::new::<NoncharacterCodePoint>().static_to_owned(),
1365             ))
1366         }
1367 
1368         /// Create a set for the `Noncharacter_Code_Point` property, using a particular data source.
1369         #[diplomat::rust_link(icu::properties::props::NoncharacterCodePoint, Struct)]
1370         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "noncharacter_code_point_with_provider")]
1371         #[cfg(feature = "buffer_provider")]
create_noncharacter_code_point_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1372         pub fn create_noncharacter_code_point_with_provider(
1373             provider: &DataProvider,
1374         ) -> Result<Box<CodePointSetData>, DataError> {
1375             Ok(Box::new(CodePointSetData(
1376                 icu_properties::CodePointSetData::try_new_unstable::<NoncharacterCodePoint>(
1377                     &provider.get_unstable()?,
1378                 )?,
1379             )))
1380         }
1381 
1382         /// Get the `Nfc_Inert` value for a given character, using compiled data
1383         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1384         #[cfg(feature = "compiled_data")]
nfc_inert_for_char(ch: DiplomatChar) -> bool1385         pub fn nfc_inert_for_char(ch: DiplomatChar) -> bool {
1386             icu_properties::CodePointSetData::new::<NfcInert>().contains32(ch)
1387         }
1388         /// Create a set for the `Nfc_Inert` property, using compiled data.
1389         #[diplomat::rust_link(icu::properties::props::NfcInert, Struct)]
1390         #[diplomat::attr(auto, named_constructor = "nfc_inert")]
1391         #[cfg(feature = "compiled_data")]
create_nfc_inert() -> Box<CodePointSetData>1392         pub fn create_nfc_inert() -> Box<CodePointSetData> {
1393             Box::new(CodePointSetData(
1394                 icu_properties::CodePointSetData::new::<NfcInert>().static_to_owned(),
1395             ))
1396         }
1397 
1398         /// Create a set for the `Nfc_Inert` property, using a particular data source.
1399         #[diplomat::rust_link(icu::properties::props::NfcInert, Struct)]
1400         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "nfc_inert_with_provider")]
1401         #[cfg(feature = "buffer_provider")]
create_nfc_inert_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1402         pub fn create_nfc_inert_with_provider(
1403             provider: &DataProvider,
1404         ) -> Result<Box<CodePointSetData>, DataError> {
1405             Ok(Box::new(CodePointSetData(
1406                 icu_properties::CodePointSetData::try_new_unstable::<NfcInert>(
1407                     &provider.get_unstable()?,
1408                 )?,
1409             )))
1410         }
1411 
1412         /// Get the `Nfd_Inert` value for a given character, using compiled data
1413         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1414         #[cfg(feature = "compiled_data")]
nfd_inert_for_char(ch: DiplomatChar) -> bool1415         pub fn nfd_inert_for_char(ch: DiplomatChar) -> bool {
1416             icu_properties::CodePointSetData::new::<NfdInert>().contains32(ch)
1417         }
1418         /// Create a set for the `Nfd_Inert` property, using compiled data.
1419         #[diplomat::rust_link(icu::properties::props::NfdInert, Struct)]
1420         #[diplomat::attr(auto, named_constructor = "nfd_inert")]
1421         #[cfg(feature = "compiled_data")]
create_nfd_inert() -> Box<CodePointSetData>1422         pub fn create_nfd_inert() -> Box<CodePointSetData> {
1423             Box::new(CodePointSetData(
1424                 icu_properties::CodePointSetData::new::<NfdInert>().static_to_owned(),
1425             ))
1426         }
1427 
1428         /// Create a set for the `Nfd_Inert` property, using a particular data source.
1429         #[diplomat::rust_link(icu::properties::props::NfdInert, Struct)]
1430         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "nfd_inert_with_provider")]
1431         #[cfg(feature = "buffer_provider")]
create_nfd_inert_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1432         pub fn create_nfd_inert_with_provider(
1433             provider: &DataProvider,
1434         ) -> Result<Box<CodePointSetData>, DataError> {
1435             Ok(Box::new(CodePointSetData(
1436                 icu_properties::CodePointSetData::try_new_unstable::<NfdInert>(
1437                     &provider.get_unstable()?,
1438                 )?,
1439             )))
1440         }
1441 
1442         /// Get the `Nfkc_Inert` value for a given character, using compiled data
1443         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1444         #[cfg(feature = "compiled_data")]
nfkc_inert_for_char(ch: DiplomatChar) -> bool1445         pub fn nfkc_inert_for_char(ch: DiplomatChar) -> bool {
1446             icu_properties::CodePointSetData::new::<NfkcInert>().contains32(ch)
1447         }
1448         /// Create a set for the `Nfkc_Inert` property, using compiled data.
1449         #[diplomat::rust_link(icu::properties::props::NfkcInert, Struct)]
1450         #[diplomat::attr(auto, named_constructor = "nfkc_inert")]
1451         #[cfg(feature = "compiled_data")]
create_nfkc_inert() -> Box<CodePointSetData>1452         pub fn create_nfkc_inert() -> Box<CodePointSetData> {
1453             Box::new(CodePointSetData(
1454                 icu_properties::CodePointSetData::new::<NfkcInert>().static_to_owned(),
1455             ))
1456         }
1457 
1458         /// Create a set for the `Nfkc_Inert` property, using a particular data source.
1459         #[diplomat::rust_link(icu::properties::props::NfkcInert, Struct)]
1460         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "nfkc_inert_with_provider")]
1461         #[cfg(feature = "buffer_provider")]
create_nfkc_inert_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1462         pub fn create_nfkc_inert_with_provider(
1463             provider: &DataProvider,
1464         ) -> Result<Box<CodePointSetData>, DataError> {
1465             Ok(Box::new(CodePointSetData(
1466                 icu_properties::CodePointSetData::try_new_unstable::<NfkcInert>(
1467                     &provider.get_unstable()?,
1468                 )?,
1469             )))
1470         }
1471 
1472         /// Get the `Nfkd_Inert` value for a given character, using compiled data
1473         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1474         #[cfg(feature = "compiled_data")]
nfkd_inert_for_char(ch: DiplomatChar) -> bool1475         pub fn nfkd_inert_for_char(ch: DiplomatChar) -> bool {
1476             icu_properties::CodePointSetData::new::<NfkdInert>().contains32(ch)
1477         }
1478         /// Create a set for the `Nfkd_Inert` property, using compiled data.
1479         #[diplomat::rust_link(icu::properties::props::NfkdInert, Struct)]
1480         #[diplomat::attr(auto, named_constructor = "nfkd_inert")]
1481         #[cfg(feature = "compiled_data")]
create_nfkd_inert() -> Box<CodePointSetData>1482         pub fn create_nfkd_inert() -> Box<CodePointSetData> {
1483             Box::new(CodePointSetData(
1484                 icu_properties::CodePointSetData::new::<NfkdInert>().static_to_owned(),
1485             ))
1486         }
1487 
1488         /// Create a set for the `Nfkd_Inert` property, using a particular data source.
1489         #[diplomat::rust_link(icu::properties::props::NfkdInert, Struct)]
1490         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "nfkd_inert_with_provider")]
1491         #[cfg(feature = "buffer_provider")]
create_nfkd_inert_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1492         pub fn create_nfkd_inert_with_provider(
1493             provider: &DataProvider,
1494         ) -> Result<Box<CodePointSetData>, DataError> {
1495             Ok(Box::new(CodePointSetData(
1496                 icu_properties::CodePointSetData::try_new_unstable::<NfkdInert>(
1497                     &provider.get_unstable()?,
1498                 )?,
1499             )))
1500         }
1501 
1502         /// Get the `Pattern_Syntax` value for a given character, using compiled data
1503         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1504         #[cfg(feature = "compiled_data")]
pattern_syntax_for_char(ch: DiplomatChar) -> bool1505         pub fn pattern_syntax_for_char(ch: DiplomatChar) -> bool {
1506             icu_properties::CodePointSetData::new::<PatternSyntax>().contains32(ch)
1507         }
1508         /// Create a set for the `Pattern_Syntax` property, using compiled data.
1509         #[diplomat::rust_link(icu::properties::props::PatternSyntax, Struct)]
1510         #[diplomat::attr(auto, named_constructor = "pattern_syntax")]
1511         #[cfg(feature = "compiled_data")]
create_pattern_syntax() -> Box<CodePointSetData>1512         pub fn create_pattern_syntax() -> Box<CodePointSetData> {
1513             Box::new(CodePointSetData(
1514                 icu_properties::CodePointSetData::new::<PatternSyntax>().static_to_owned(),
1515             ))
1516         }
1517 
1518         /// Create a set for the `Pattern_Syntax` property, using a particular data source.
1519         #[diplomat::rust_link(icu::properties::props::PatternSyntax, Struct)]
1520         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "pattern_syntax_with_provider")]
1521         #[cfg(feature = "buffer_provider")]
create_pattern_syntax_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1522         pub fn create_pattern_syntax_with_provider(
1523             provider: &DataProvider,
1524         ) -> Result<Box<CodePointSetData>, DataError> {
1525             Ok(Box::new(CodePointSetData(
1526                 icu_properties::CodePointSetData::try_new_unstable::<PatternSyntax>(
1527                     &provider.get_unstable()?,
1528                 )?,
1529             )))
1530         }
1531 
1532         /// Get the `Pattern_White_Space` value for a given character, using compiled data
1533         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1534         #[cfg(feature = "compiled_data")]
pattern_white_space_for_char(ch: DiplomatChar) -> bool1535         pub fn pattern_white_space_for_char(ch: DiplomatChar) -> bool {
1536             icu_properties::CodePointSetData::new::<PatternWhiteSpace>().contains32(ch)
1537         }
1538         /// Create a set for the `Pattern_White_Space` property, using compiled data.
1539         #[diplomat::rust_link(icu::properties::props::PatternWhiteSpace, Struct)]
1540         #[diplomat::attr(auto, named_constructor = "pattern_white_space")]
1541         #[cfg(feature = "compiled_data")]
create_pattern_white_space() -> Box<CodePointSetData>1542         pub fn create_pattern_white_space() -> Box<CodePointSetData> {
1543             Box::new(CodePointSetData(
1544                 icu_properties::CodePointSetData::new::<PatternWhiteSpace>().static_to_owned(),
1545             ))
1546         }
1547 
1548         /// Create a set for the `Pattern_White_Space` property, using a particular data source.
1549         #[diplomat::rust_link(icu::properties::props::PatternWhiteSpace, Struct)]
1550         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "pattern_white_space_with_provider")]
1551         #[cfg(feature = "buffer_provider")]
create_pattern_white_space_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1552         pub fn create_pattern_white_space_with_provider(
1553             provider: &DataProvider,
1554         ) -> Result<Box<CodePointSetData>, DataError> {
1555             Ok(Box::new(CodePointSetData(
1556                 icu_properties::CodePointSetData::try_new_unstable::<PatternWhiteSpace>(
1557                     &provider.get_unstable()?,
1558                 )?,
1559             )))
1560         }
1561 
1562         /// Get the `Prepended_Concatenation_Mark` value for a given character, using compiled data
1563         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1564         #[cfg(feature = "compiled_data")]
prepended_concatenation_mark_for_char(ch: DiplomatChar) -> bool1565         pub fn prepended_concatenation_mark_for_char(ch: DiplomatChar) -> bool {
1566             icu_properties::CodePointSetData::new::<PrependedConcatenationMark>().contains32(ch)
1567         }
1568         /// Create a set for the `Prepended_Concatenation_Mark` property, using compiled data.
1569         #[diplomat::rust_link(icu::properties::props::PrependedConcatenationMark, Struct)]
1570         #[diplomat::attr(auto, named_constructor = "prepended_concatenation_mark")]
1571         #[cfg(feature = "compiled_data")]
create_prepended_concatenation_mark() -> Box<CodePointSetData>1572         pub fn create_prepended_concatenation_mark() -> Box<CodePointSetData> {
1573             Box::new(CodePointSetData(
1574                 icu_properties::CodePointSetData::new::<PrependedConcatenationMark>()
1575                     .static_to_owned(),
1576             ))
1577         }
1578 
1579         /// Create a set for the `Prepended_Concatenation_Mark` property, using a particular data source.
1580         #[diplomat::rust_link(icu::properties::props::PrependedConcatenationMark, Struct)]
1581         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "prepended_concatenation_mark_with_provider")]
1582         #[cfg(feature = "buffer_provider")]
create_prepended_concatenation_mark_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1583         pub fn create_prepended_concatenation_mark_with_provider(
1584             provider: &DataProvider,
1585         ) -> Result<Box<CodePointSetData>, DataError> {
1586             Ok(Box::new(CodePointSetData(
1587                 icu_properties::CodePointSetData::try_new_unstable::<PrependedConcatenationMark>(
1588                     &provider.get_unstable()?,
1589                 )?,
1590             )))
1591         }
1592 
1593         /// Get the `Print` value for a given character, using compiled data
1594         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1595         #[cfg(feature = "compiled_data")]
print_for_char(ch: DiplomatChar) -> bool1596         pub fn print_for_char(ch: DiplomatChar) -> bool {
1597             icu_properties::CodePointSetData::new::<Print>().contains32(ch)
1598         }
1599         /// Create a set for the `Print` property, using compiled data.
1600         #[diplomat::rust_link(icu::properties::props::Print, Struct)]
1601         #[diplomat::attr(auto, named_constructor = "print")]
1602         #[cfg(feature = "compiled_data")]
create_print() -> Box<CodePointSetData>1603         pub fn create_print() -> Box<CodePointSetData> {
1604             Box::new(CodePointSetData(
1605                 icu_properties::CodePointSetData::new::<Print>().static_to_owned(),
1606             ))
1607         }
1608 
1609         /// Create a set for the `Print` property, using a particular data source.
1610         #[diplomat::rust_link(icu::properties::props::Print, Struct)]
1611         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "print_with_provider")]
1612         #[cfg(feature = "buffer_provider")]
create_print_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1613         pub fn create_print_with_provider(
1614             provider: &DataProvider,
1615         ) -> Result<Box<CodePointSetData>, DataError> {
1616             Ok(Box::new(CodePointSetData(
1617                 icu_properties::CodePointSetData::try_new_unstable::<Print>(
1618                     &provider.get_unstable()?,
1619                 )?,
1620             )))
1621         }
1622 
1623         /// Get the `Quotation_Mark` value for a given character, using compiled data
1624         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1625         #[cfg(feature = "compiled_data")]
quotation_mark_for_char(ch: DiplomatChar) -> bool1626         pub fn quotation_mark_for_char(ch: DiplomatChar) -> bool {
1627             icu_properties::CodePointSetData::new::<QuotationMark>().contains32(ch)
1628         }
1629         /// Create a set for the `Quotation_Mark` property, using compiled data.
1630         #[diplomat::rust_link(icu::properties::props::QuotationMark, Struct)]
1631         #[diplomat::attr(auto, named_constructor = "quotation_mark")]
1632         #[cfg(feature = "compiled_data")]
create_quotation_mark() -> Box<CodePointSetData>1633         pub fn create_quotation_mark() -> Box<CodePointSetData> {
1634             Box::new(CodePointSetData(
1635                 icu_properties::CodePointSetData::new::<QuotationMark>().static_to_owned(),
1636             ))
1637         }
1638 
1639         /// Create a set for the `Quotation_Mark` property, using a particular data source.
1640         #[diplomat::rust_link(icu::properties::props::QuotationMark, Struct)]
1641         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "quotation_mark_with_provider")]
1642         #[cfg(feature = "buffer_provider")]
create_quotation_mark_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1643         pub fn create_quotation_mark_with_provider(
1644             provider: &DataProvider,
1645         ) -> Result<Box<CodePointSetData>, DataError> {
1646             Ok(Box::new(CodePointSetData(
1647                 icu_properties::CodePointSetData::try_new_unstable::<QuotationMark>(
1648                     &provider.get_unstable()?,
1649                 )?,
1650             )))
1651         }
1652 
1653         /// Get the `Radical` value for a given character, using compiled data
1654         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1655         #[cfg(feature = "compiled_data")]
radical_for_char(ch: DiplomatChar) -> bool1656         pub fn radical_for_char(ch: DiplomatChar) -> bool {
1657             icu_properties::CodePointSetData::new::<Radical>().contains32(ch)
1658         }
1659         /// Create a set for the `Radical` property, using compiled data.
1660         #[diplomat::rust_link(icu::properties::props::Radical, Struct)]
1661         #[diplomat::attr(auto, named_constructor = "radical")]
1662         #[cfg(feature = "compiled_data")]
create_radical() -> Box<CodePointSetData>1663         pub fn create_radical() -> Box<CodePointSetData> {
1664             Box::new(CodePointSetData(
1665                 icu_properties::CodePointSetData::new::<Radical>().static_to_owned(),
1666             ))
1667         }
1668 
1669         /// Create a set for the `Radical` property, using a particular data source.
1670         #[diplomat::rust_link(icu::properties::props::Radical, Struct)]
1671         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "radical_with_provider")]
1672         #[cfg(feature = "buffer_provider")]
create_radical_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1673         pub fn create_radical_with_provider(
1674             provider: &DataProvider,
1675         ) -> Result<Box<CodePointSetData>, DataError> {
1676             Ok(Box::new(CodePointSetData(
1677                 icu_properties::CodePointSetData::try_new_unstable::<Radical>(
1678                     &provider.get_unstable()?,
1679                 )?,
1680             )))
1681         }
1682 
1683         /// Get the `Regional_Indicator` value for a given character, using compiled data
1684         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1685         #[cfg(feature = "compiled_data")]
regional_indicator_for_char(ch: DiplomatChar) -> bool1686         pub fn regional_indicator_for_char(ch: DiplomatChar) -> bool {
1687             icu_properties::CodePointSetData::new::<RegionalIndicator>().contains32(ch)
1688         }
1689         /// Create a set for the `Regional_Indicator` property, using compiled data.
1690         #[diplomat::rust_link(icu::properties::props::RegionalIndicator, Struct)]
1691         #[diplomat::attr(auto, named_constructor = "regional_indicator")]
1692         #[cfg(feature = "compiled_data")]
create_regional_indicator() -> Box<CodePointSetData>1693         pub fn create_regional_indicator() -> Box<CodePointSetData> {
1694             Box::new(CodePointSetData(
1695                 icu_properties::CodePointSetData::new::<RegionalIndicator>().static_to_owned(),
1696             ))
1697         }
1698 
1699         /// Create a set for the `Regional_Indicator` property, using a particular data source.
1700         #[diplomat::rust_link(icu::properties::props::RegionalIndicator, Struct)]
1701         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "regional_indicator_with_provider")]
1702         #[cfg(feature = "buffer_provider")]
create_regional_indicator_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1703         pub fn create_regional_indicator_with_provider(
1704             provider: &DataProvider,
1705         ) -> Result<Box<CodePointSetData>, DataError> {
1706             Ok(Box::new(CodePointSetData(
1707                 icu_properties::CodePointSetData::try_new_unstable::<RegionalIndicator>(
1708                     &provider.get_unstable()?,
1709                 )?,
1710             )))
1711         }
1712 
1713         /// Get the `Soft_Dotted` value for a given character, using compiled data
1714         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1715         #[cfg(feature = "compiled_data")]
soft_dotted_for_char(ch: DiplomatChar) -> bool1716         pub fn soft_dotted_for_char(ch: DiplomatChar) -> bool {
1717             icu_properties::CodePointSetData::new::<SoftDotted>().contains32(ch)
1718         }
1719         /// Create a set for the `Soft_Dotted` property, using compiled data.
1720         #[diplomat::rust_link(icu::properties::props::SoftDotted, Struct)]
1721         #[diplomat::attr(auto, named_constructor = "soft_dotted")]
1722         #[cfg(feature = "compiled_data")]
create_soft_dotted() -> Box<CodePointSetData>1723         pub fn create_soft_dotted() -> Box<CodePointSetData> {
1724             Box::new(CodePointSetData(
1725                 icu_properties::CodePointSetData::new::<SoftDotted>().static_to_owned(),
1726             ))
1727         }
1728 
1729         /// Create a set for the `Soft_Dotted` property, using a particular data source.
1730         #[diplomat::rust_link(icu::properties::props::SoftDotted, Struct)]
1731         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "soft_dotted_with_provider")]
1732         #[cfg(feature = "buffer_provider")]
create_soft_dotted_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1733         pub fn create_soft_dotted_with_provider(
1734             provider: &DataProvider,
1735         ) -> Result<Box<CodePointSetData>, DataError> {
1736             Ok(Box::new(CodePointSetData(
1737                 icu_properties::CodePointSetData::try_new_unstable::<SoftDotted>(
1738                     &provider.get_unstable()?,
1739                 )?,
1740             )))
1741         }
1742 
1743         /// Get the `Segment_Starter` value for a given character, using compiled data
1744         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1745         #[cfg(feature = "compiled_data")]
segment_starter_for_char(ch: DiplomatChar) -> bool1746         pub fn segment_starter_for_char(ch: DiplomatChar) -> bool {
1747             icu_properties::CodePointSetData::new::<SegmentStarter>().contains32(ch)
1748         }
1749         /// Create a set for the `Segment_Starter` property, using compiled data.
1750         #[diplomat::rust_link(icu::properties::props::SegmentStarter, Struct)]
1751         #[diplomat::attr(auto, named_constructor = "segment_starter")]
1752         #[cfg(feature = "compiled_data")]
create_segment_starter() -> Box<CodePointSetData>1753         pub fn create_segment_starter() -> Box<CodePointSetData> {
1754             Box::new(CodePointSetData(
1755                 icu_properties::CodePointSetData::new::<SegmentStarter>().static_to_owned(),
1756             ))
1757         }
1758 
1759         /// Create a set for the `Segment_Starter` property, using a particular data source.
1760         #[diplomat::rust_link(icu::properties::props::SegmentStarter, Struct)]
1761         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "segment_starter_with_provider")]
1762         #[cfg(feature = "buffer_provider")]
create_segment_starter_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1763         pub fn create_segment_starter_with_provider(
1764             provider: &DataProvider,
1765         ) -> Result<Box<CodePointSetData>, DataError> {
1766             Ok(Box::new(CodePointSetData(
1767                 icu_properties::CodePointSetData::try_new_unstable::<SegmentStarter>(
1768                     &provider.get_unstable()?,
1769                 )?,
1770             )))
1771         }
1772 
1773         /// Get the `Case_Sensitive` value for a given character, using compiled data
1774         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1775         #[cfg(feature = "compiled_data")]
case_sensitive_for_char(ch: DiplomatChar) -> bool1776         pub fn case_sensitive_for_char(ch: DiplomatChar) -> bool {
1777             icu_properties::CodePointSetData::new::<CaseSensitive>().contains32(ch)
1778         }
1779         /// Create a set for the `Case_Sensitive` property, using compiled data.
1780         #[diplomat::rust_link(icu::properties::props::CaseSensitive, Struct)]
1781         #[diplomat::attr(auto, named_constructor = "case_sensitive")]
1782         #[cfg(feature = "compiled_data")]
create_case_sensitive() -> Box<CodePointSetData>1783         pub fn create_case_sensitive() -> Box<CodePointSetData> {
1784             Box::new(CodePointSetData(
1785                 icu_properties::CodePointSetData::new::<CaseSensitive>().static_to_owned(),
1786             ))
1787         }
1788 
1789         /// Create a set for the `Case_Sensitive` property, using a particular data source.
1790         #[diplomat::rust_link(icu::properties::props::CaseSensitive, Struct)]
1791         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "case_sensitive_with_provider")]
1792         #[cfg(feature = "buffer_provider")]
create_case_sensitive_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1793         pub fn create_case_sensitive_with_provider(
1794             provider: &DataProvider,
1795         ) -> Result<Box<CodePointSetData>, DataError> {
1796             Ok(Box::new(CodePointSetData(
1797                 icu_properties::CodePointSetData::try_new_unstable::<CaseSensitive>(
1798                     &provider.get_unstable()?,
1799                 )?,
1800             )))
1801         }
1802 
1803         /// Get the `Sentence_Terminal` value for a given character, using compiled data
1804         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1805         #[cfg(feature = "compiled_data")]
sentence_terminal_for_char(ch: DiplomatChar) -> bool1806         pub fn sentence_terminal_for_char(ch: DiplomatChar) -> bool {
1807             icu_properties::CodePointSetData::new::<SentenceTerminal>().contains32(ch)
1808         }
1809         /// Create a set for the `Sentence_Terminal` property, using compiled data.
1810         #[diplomat::rust_link(icu::properties::props::SentenceTerminal, Struct)]
1811         #[diplomat::attr(auto, named_constructor = "sentence_terminal")]
1812         #[cfg(feature = "compiled_data")]
create_sentence_terminal() -> Box<CodePointSetData>1813         pub fn create_sentence_terminal() -> Box<CodePointSetData> {
1814             Box::new(CodePointSetData(
1815                 icu_properties::CodePointSetData::new::<SentenceTerminal>().static_to_owned(),
1816             ))
1817         }
1818 
1819         /// Create a set for the `Sentence_Terminal` property, using a particular data source.
1820         #[diplomat::rust_link(icu::properties::props::SentenceTerminal, Struct)]
1821         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "sentence_terminal_with_provider")]
1822         #[cfg(feature = "buffer_provider")]
create_sentence_terminal_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1823         pub fn create_sentence_terminal_with_provider(
1824             provider: &DataProvider,
1825         ) -> Result<Box<CodePointSetData>, DataError> {
1826             Ok(Box::new(CodePointSetData(
1827                 icu_properties::CodePointSetData::try_new_unstable::<SentenceTerminal>(
1828                     &provider.get_unstable()?,
1829                 )?,
1830             )))
1831         }
1832 
1833         /// Get the `Terminal_Punctuation` value for a given character, using compiled data
1834         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1835         #[cfg(feature = "compiled_data")]
terminal_punctuation_for_char(ch: DiplomatChar) -> bool1836         pub fn terminal_punctuation_for_char(ch: DiplomatChar) -> bool {
1837             icu_properties::CodePointSetData::new::<TerminalPunctuation>().contains32(ch)
1838         }
1839         /// Create a set for the `Terminal_Punctuation` property, using compiled data.
1840         #[diplomat::rust_link(icu::properties::props::TerminalPunctuation, Struct)]
1841         #[diplomat::attr(auto, named_constructor = "terminal_punctuation")]
1842         #[cfg(feature = "compiled_data")]
create_terminal_punctuation() -> Box<CodePointSetData>1843         pub fn create_terminal_punctuation() -> Box<CodePointSetData> {
1844             Box::new(CodePointSetData(
1845                 icu_properties::CodePointSetData::new::<TerminalPunctuation>().static_to_owned(),
1846             ))
1847         }
1848 
1849         /// Create a set for the `Terminal_Punctuation` property, using a particular data source.
1850         #[diplomat::rust_link(icu::properties::props::TerminalPunctuation, Struct)]
1851         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "terminal_punctuation_with_provider")]
1852         #[cfg(feature = "buffer_provider")]
create_terminal_punctuation_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1853         pub fn create_terminal_punctuation_with_provider(
1854             provider: &DataProvider,
1855         ) -> Result<Box<CodePointSetData>, DataError> {
1856             Ok(Box::new(CodePointSetData(
1857                 icu_properties::CodePointSetData::try_new_unstable::<TerminalPunctuation>(
1858                     &provider.get_unstable()?,
1859                 )?,
1860             )))
1861         }
1862 
1863         /// Get the `Unified_Ideograph` value for a given character, using compiled data
1864         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1865         #[cfg(feature = "compiled_data")]
unified_ideograph_for_char(ch: DiplomatChar) -> bool1866         pub fn unified_ideograph_for_char(ch: DiplomatChar) -> bool {
1867             icu_properties::CodePointSetData::new::<UnifiedIdeograph>().contains32(ch)
1868         }
1869         /// Create a set for the `Unified_Ideograph` property, using compiled data.
1870         #[diplomat::rust_link(icu::properties::props::UnifiedIdeograph, Struct)]
1871         #[diplomat::attr(auto, named_constructor = "unified_ideograph")]
1872         #[cfg(feature = "compiled_data")]
create_unified_ideograph() -> Box<CodePointSetData>1873         pub fn create_unified_ideograph() -> Box<CodePointSetData> {
1874             Box::new(CodePointSetData(
1875                 icu_properties::CodePointSetData::new::<UnifiedIdeograph>().static_to_owned(),
1876             ))
1877         }
1878 
1879         /// Create a set for the `Unified_Ideograph` property, using a particular data source.
1880         #[diplomat::rust_link(icu::properties::props::UnifiedIdeograph, Struct)]
1881         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "unified_ideograph_with_provider")]
1882         #[cfg(feature = "buffer_provider")]
create_unified_ideograph_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1883         pub fn create_unified_ideograph_with_provider(
1884             provider: &DataProvider,
1885         ) -> Result<Box<CodePointSetData>, DataError> {
1886             Ok(Box::new(CodePointSetData(
1887                 icu_properties::CodePointSetData::try_new_unstable::<UnifiedIdeograph>(
1888                     &provider.get_unstable()?,
1889                 )?,
1890             )))
1891         }
1892 
1893         /// Get the `Uppercase` value for a given character, using compiled data
1894         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1895         #[cfg(feature = "compiled_data")]
uppercase_for_char(ch: DiplomatChar) -> bool1896         pub fn uppercase_for_char(ch: DiplomatChar) -> bool {
1897             icu_properties::CodePointSetData::new::<Uppercase>().contains32(ch)
1898         }
1899         /// Create a set for the `Uppercase` property, using compiled data.
1900         #[diplomat::rust_link(icu::properties::props::Uppercase, Struct)]
1901         #[diplomat::attr(auto, named_constructor = "uppercase")]
1902         #[cfg(feature = "compiled_data")]
create_uppercase() -> Box<CodePointSetData>1903         pub fn create_uppercase() -> Box<CodePointSetData> {
1904             Box::new(CodePointSetData(
1905                 icu_properties::CodePointSetData::new::<Uppercase>().static_to_owned(),
1906             ))
1907         }
1908 
1909         /// Create a set for the `Uppercase` property, using a particular data source.
1910         #[diplomat::rust_link(icu::properties::props::Uppercase, Struct)]
1911         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "uppercase_with_provider")]
1912         #[cfg(feature = "buffer_provider")]
create_uppercase_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1913         pub fn create_uppercase_with_provider(
1914             provider: &DataProvider,
1915         ) -> Result<Box<CodePointSetData>, DataError> {
1916             Ok(Box::new(CodePointSetData(
1917                 icu_properties::CodePointSetData::try_new_unstable::<Uppercase>(
1918                     &provider.get_unstable()?,
1919                 )?,
1920             )))
1921         }
1922 
1923         /// Get the `Variation_Selector` value for a given character, using compiled data
1924         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1925         #[cfg(feature = "compiled_data")]
variation_selector_for_char(ch: DiplomatChar) -> bool1926         pub fn variation_selector_for_char(ch: DiplomatChar) -> bool {
1927             icu_properties::CodePointSetData::new::<VariationSelector>().contains32(ch)
1928         }
1929         /// Create a set for the `Variation_Selector` property, using compiled data.
1930         #[diplomat::rust_link(icu::properties::props::VariationSelector, Struct)]
1931         #[diplomat::attr(auto, named_constructor = "variation_selector")]
1932         #[cfg(feature = "compiled_data")]
create_variation_selector() -> Box<CodePointSetData>1933         pub fn create_variation_selector() -> Box<CodePointSetData> {
1934             Box::new(CodePointSetData(
1935                 icu_properties::CodePointSetData::new::<VariationSelector>().static_to_owned(),
1936             ))
1937         }
1938 
1939         /// Create a set for the `Variation_Selector` property, using a particular data source.
1940         #[diplomat::rust_link(icu::properties::props::VariationSelector, Struct)]
1941         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "variation_selector_with_provider")]
1942         #[cfg(feature = "buffer_provider")]
create_variation_selector_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1943         pub fn create_variation_selector_with_provider(
1944             provider: &DataProvider,
1945         ) -> Result<Box<CodePointSetData>, DataError> {
1946             Ok(Box::new(CodePointSetData(
1947                 icu_properties::CodePointSetData::try_new_unstable::<VariationSelector>(
1948                     &provider.get_unstable()?,
1949                 )?,
1950             )))
1951         }
1952 
1953         /// Get the `White_Space` value for a given character, using compiled data
1954         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1955         #[cfg(feature = "compiled_data")]
white_space_for_char(ch: DiplomatChar) -> bool1956         pub fn white_space_for_char(ch: DiplomatChar) -> bool {
1957             icu_properties::CodePointSetData::new::<WhiteSpace>().contains32(ch)
1958         }
1959         /// Create a set for the `White_Space` property, using compiled data.
1960         #[diplomat::rust_link(icu::properties::props::WhiteSpace, Struct)]
1961         #[diplomat::attr(auto, named_constructor = "white_space")]
1962         #[cfg(feature = "compiled_data")]
create_white_space() -> Box<CodePointSetData>1963         pub fn create_white_space() -> Box<CodePointSetData> {
1964             Box::new(CodePointSetData(
1965                 icu_properties::CodePointSetData::new::<WhiteSpace>().static_to_owned(),
1966             ))
1967         }
1968 
1969         /// Create a set for the `White_Space` property, using a particular data source.
1970         #[diplomat::rust_link(icu::properties::props::WhiteSpace, Struct)]
1971         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "white_space_with_provider")]
1972         #[cfg(feature = "buffer_provider")]
create_white_space_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>1973         pub fn create_white_space_with_provider(
1974             provider: &DataProvider,
1975         ) -> Result<Box<CodePointSetData>, DataError> {
1976             Ok(Box::new(CodePointSetData(
1977                 icu_properties::CodePointSetData::try_new_unstable::<WhiteSpace>(
1978                     &provider.get_unstable()?,
1979                 )?,
1980             )))
1981         }
1982 
1983         /// Get the `Xdigit` value for a given character, using compiled data
1984         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
1985         #[cfg(feature = "compiled_data")]
xdigit_for_char(ch: DiplomatChar) -> bool1986         pub fn xdigit_for_char(ch: DiplomatChar) -> bool {
1987             icu_properties::CodePointSetData::new::<Xdigit>().contains32(ch)
1988         }
1989         /// Create a set for the `Xdigit` property, using compiled data.
1990         #[diplomat::rust_link(icu::properties::props::Xdigit, Struct)]
1991         #[diplomat::attr(auto, named_constructor = "xdigit")]
1992         #[cfg(feature = "compiled_data")]
create_xdigit() -> Box<CodePointSetData>1993         pub fn create_xdigit() -> Box<CodePointSetData> {
1994             Box::new(CodePointSetData(
1995                 icu_properties::CodePointSetData::new::<Xdigit>().static_to_owned(),
1996             ))
1997         }
1998 
1999         /// Create a set for the `Xdigit` property, using a particular data source.
2000         #[diplomat::rust_link(icu::properties::props::Xdigit, Struct)]
2001         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "xdigit_with_provider")]
2002         #[cfg(feature = "buffer_provider")]
create_xdigit_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>2003         pub fn create_xdigit_with_provider(
2004             provider: &DataProvider,
2005         ) -> Result<Box<CodePointSetData>, DataError> {
2006             Ok(Box::new(CodePointSetData(
2007                 icu_properties::CodePointSetData::try_new_unstable::<Xdigit>(
2008                     &provider.get_unstable()?,
2009                 )?,
2010             )))
2011         }
2012 
2013         /// Get the `Xid_Continue` value for a given character, using compiled data
2014         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
2015         #[cfg(feature = "compiled_data")]
xid_continue_for_char(ch: DiplomatChar) -> bool2016         pub fn xid_continue_for_char(ch: DiplomatChar) -> bool {
2017             icu_properties::CodePointSetData::new::<XidContinue>().contains32(ch)
2018         }
2019         /// Create a set for the `Xid_Continue` property, using compiled data.
2020         #[diplomat::rust_link(icu::properties::props::XidContinue, Struct)]
2021         #[diplomat::attr(auto, named_constructor = "xid_continue")]
2022         #[cfg(feature = "compiled_data")]
create_xid_continue() -> Box<CodePointSetData>2023         pub fn create_xid_continue() -> Box<CodePointSetData> {
2024             Box::new(CodePointSetData(
2025                 icu_properties::CodePointSetData::new::<XidContinue>().static_to_owned(),
2026             ))
2027         }
2028 
2029         /// Create a set for the `Xid_Continue` property, using a particular data source.
2030         #[diplomat::rust_link(icu::properties::props::XidContinue, Struct)]
2031         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "xid_continue_with_provider")]
2032         #[cfg(feature = "buffer_provider")]
create_xid_continue_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>2033         pub fn create_xid_continue_with_provider(
2034             provider: &DataProvider,
2035         ) -> Result<Box<CodePointSetData>, DataError> {
2036             Ok(Box::new(CodePointSetData(
2037                 icu_properties::CodePointSetData::try_new_unstable::<XidContinue>(
2038                     &provider.get_unstable()?,
2039                 )?,
2040             )))
2041         }
2042 
2043         /// Get the `Xid_Start` value for a given character, using compiled data
2044         #[diplomat::rust_link(icu::properties::props::BinaryProperty::for_char, FnInTrait)]
2045         #[cfg(feature = "compiled_data")]
xid_start_for_char(ch: DiplomatChar) -> bool2046         pub fn xid_start_for_char(ch: DiplomatChar) -> bool {
2047             icu_properties::CodePointSetData::new::<XidStart>().contains32(ch)
2048         }
2049         /// Create a set for the `Xid_Start` property, using compiled data.
2050         #[diplomat::rust_link(icu::properties::props::XidStart, Struct)]
2051         #[diplomat::attr(auto, named_constructor = "xid_start")]
2052         #[cfg(feature = "compiled_data")]
create_xid_start() -> Box<CodePointSetData>2053         pub fn create_xid_start() -> Box<CodePointSetData> {
2054             Box::new(CodePointSetData(
2055                 icu_properties::CodePointSetData::new::<XidStart>().static_to_owned(),
2056             ))
2057         }
2058 
2059         /// Create a set for the `Xid_Start` property, using a particular data source.
2060         #[diplomat::rust_link(icu::properties::props::XidStart, Struct)]
2061         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "xid_start_with_provider")]
2062         #[cfg(feature = "buffer_provider")]
create_xid_start_with_provider( provider: &DataProvider, ) -> Result<Box<CodePointSetData>, DataError>2063         pub fn create_xid_start_with_provider(
2064             provider: &DataProvider,
2065         ) -> Result<Box<CodePointSetData>, DataError> {
2066             Ok(Box::new(CodePointSetData(
2067                 icu_properties::CodePointSetData::try_new_unstable::<XidStart>(
2068                     &provider.get_unstable()?,
2069                 )?,
2070             )))
2071         }
2072 
2073         /// [ecma]: https://tc39.es/ecma262/#table-binary-unicode-properties
2074         #[diplomat::rust_link(icu::properties::CodePointSetData::new_for_ecma262, FnInStruct)]
2075         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "for_ecma262")]
2076         #[cfg(feature = "compiled_data")]
create_for_ecma262( property_name: &DiplomatStr, ) -> Result<Box<CodePointSetData>, DataError>2077         pub fn create_for_ecma262(
2078             property_name: &DiplomatStr,
2079         ) -> Result<Box<CodePointSetData>, DataError> {
2080             let data = icu_properties::CodePointSetData::new_for_ecma262(property_name)
2081                 .ok_or(DataError::Custom)?
2082                 .static_to_owned();
2083             Ok(Box::new(CodePointSetData(data)))
2084         }
2085 
2086         /// [ecma]: https://tc39.es/ecma262/#table-binary-unicode-properties
2087         #[diplomat::rust_link(icu::properties::CodePointSetData::new_for_ecma262, FnInStruct)]
2088         #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "for_ecma262_with_provider")]
2089         #[cfg(feature = "buffer_provider")]
create_for_ecma262_with_provider( provider: &DataProvider, property_name: &DiplomatStr, ) -> Result<Box<CodePointSetData>, DataError>2090         pub fn create_for_ecma262_with_provider(
2091             provider: &DataProvider,
2092             property_name: &DiplomatStr,
2093         ) -> Result<Box<CodePointSetData>, DataError> {
2094             Ok(Box::new(CodePointSetData(
2095                 icu_properties::CodePointSetData::try_new_for_ecma262_unstable(
2096                     &provider.get_unstable()?,
2097                     property_name,
2098                 )
2099                 .ok_or(DataError::Custom)??,
2100             )))
2101         }
2102     }
2103 }
2104