Skip to content

Commit 0087396

Browse files
committed
Add doc comments
1 parent 106eb28 commit 0087396

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

utils/codepointtrie/src/codepointtrie.rs

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ pub enum TrieType {
3232
/// A trait representing the values stored in the data array of a [`CodePointTrie`].
3333
/// This trait is used as a type parameter in constructing a `CodePointTrie`.
3434
pub trait TrieValue: Copy + zerovec::ule::AsULE + 'static {
35+
/// The value to return if we cannot read data from the trie.
3536
const DATA_GET_ERROR_VALUE: Self;
3637
}
3738

utils/codepointtrie/src/provider.rs

+8
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,22 @@
22
// called LICENSE at the top level of the ICU4X source tree
33
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
44

5+
//! Data provider struct definitions for this ICU4X component.
6+
//!
7+
//! Read more about data providers: [`icu_provider`]
8+
59
use crate::codepointtrie::{CodePointTrie, TrieValue};
610
use icu_provider::yoke::{self, Yokeable, ZeroCopyFrom};
711

12+
/// A map efficiently storing data about individual characters.
813
#[derive(Yokeable, ZeroCopyFrom)]
914
pub struct UnicodePropertyMapV1<'data, T: TrieValue> {
15+
/// A codepoint trie storing the data
1016
pub codepoint_trie: CodePointTrie<'data, T>,
1117
}
1218

19+
/// Marker type for UnicodePropertyMapV1.
20+
/// This is generated by hand because icu_provider::data_struct doesn't support generics yet.
1321
pub struct UnicodePropertyMapV1Marker<T: TrieValue> {
1422
_phantom: core::marker::PhantomData<T>,
1523
}

0 commit comments

Comments
 (0)