Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian committed Jun 26, 2023
1 parent 0f1f7ef commit 31890b5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
12 changes: 7 additions & 5 deletions components/properties/src/exemplar_chars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ macro_rules! make_exemplar_chars_unicode_set_property {
$vis2:vis fn $constname:ident();
) => {
#[doc = concat!("[`", stringify!($constname), "()`] with a runtime data provider argument.")]
///
/// Note that this will return an owned version of the data. Functionality is available on
/// the borrowed version, accessible through `.as_borrowed()`.
$vis fn $funcname(
provider: &(impl DataProvider<$keyed_data_marker> + ?Sized),
locale: &DataLocale,
Expand All @@ -65,17 +68,16 @@ macro_rules! make_exemplar_chars_unicode_set_property {
#[cfg(feature = "data")]
$vis2 fn $constname(
locale: &DataLocale,
) -> UnicodeSetData {
UnicodeSetData::from_data(
) -> Result<UnicodeSetData, DataError> {
Ok(UnicodeSetData::from_data(
DataProvider::<$keyed_data_marker>::load(
&crate::provider::Baked,
DataRequest {
locale,
metadata: Default::default(),
})
.and_then(DataResponse::take_payload)
.expect("provider is infallible")
)
.and_then(DataResponse::take_payload)?
))
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions components/properties/src/maps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@ macro_rules! make_map_property {
$vis:vis fn $name:ident();
) => {
#[doc = concat!("[`", stringify!($constname), "()`] with a runtime data provider argument.")]
///
/// Note that this will return an owned version of the data. Functionality is available on
/// the borrowed version, accessible through `.as_borrowed()`.
$vis fn $name(
provider: &(impl DataProvider<$keyed_data_marker> + ?Sized)
) -> Result<CodePointMapData<$value_ty>, PropertiesError> {
Expand Down
3 changes: 3 additions & 0 deletions components/properties/src/sets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ macro_rules! make_code_point_set_property {
$vis:vis fn $funcname:ident();
) => {
#[doc = concat!("[`", stringify!($constname), "()`] with a runtime data provider argument.")]
///
/// Note that this will return an owned version of the data. Functionality is available on
/// the borrowed version, accessible through `.as_borrowed()`.
$vis fn $funcname(
provider: &(impl DataProvider<$keyed_data_marker> + ?Sized)
) -> Result<CodePointSetData, PropertiesError> {
Expand Down

0 comments on commit 31890b5

Please sign in to comment.