Struct CodePointMapData
struct CodePointMapData<T: TrieValue> { ... }
A wrapper around code point map data.
It is returned by APIs that return Unicode
property data in a map-like form, ex: enumerated property value data keyed
by code point. Access its data via the borrowed version,
CodePointMapDataBorrowed.
Implementations
impl<T: TrieValue> CodePointMapData<T>
const fn new() -> CodePointMapDataBorrowed<'static, T> where T: EnumeratedPropertyCreates a new
CodePointMapDatafor aEnumeratedProperty.See the documentation on
EnumeratedPropertyimplementations for details.✨ Enabled with the
compiled_dataCargo feature.fn try_new_unstable<impl DataProvider<T::DataMarker> + ?Sized: DataProvider<<T as >::DataMarker> + ?Sized>(provider: &impl DataProvider<<T as >::DataMarker> + ?Sized) -> Result<Self, DataError> where T: EnumeratedPropertyA version of
Self::newthat uses custom data provided by aDataProvider.⚠️ The bounds on provider may change over time, including in SemVer minor releases.fn as_borrowed(self: &Self) -> CodePointMapDataBorrowed<'_, T>Construct a borrowed version of this type that can be queried.
This avoids a potential small underlying cost per API call (like
get()) by consolidating it up front.This owned version if returned by functions that use a runtime data provider.
fn from_code_point_trie(trie: CodePointTrie<'static, T>) -> SelfConstruct a new one an owned
CodePointTriefn as_code_point_trie(self: &Self) -> Option<&CodePointTrie<'_, T>>Convert this type to a
CodePointTrieas a borrowed value.The data backing this is extensible and supports multiple implementations. Currently it is always
CodePointTrie; however in the future more backends may be added, and users may select which at data generation time.This method returns an
Optionin order to returnNonewhen the backing data provider cannot return aCodePointTrie, or cannot do so within the expected constant time constraint.fn to_code_point_trie(self: &Self) -> CodePointTrie<'_, T>Convert this type to a
CodePointTrie, borrowing if possible, otherwise allocating a newCodePointTrie.The data backing this is extensible and supports multiple implementations. Currently it is always
CodePointTrie; however in the future more backends may be added, and users may select which at data generation time.The performance of the conversion to this specific return type will vary depending on the data structure that is backing
self.
impl<T> Any for CodePointMapData<T>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for CodePointMapData<T>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for CodePointMapData<T>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for CodePointMapData<T>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> ErasedDestructor for CodePointMapData<T>
impl<T> Freeze for CodePointMapData<T>
impl<T> From for CodePointMapData<T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> RefUnwindSafe for CodePointMapData<T>
impl<T> Send for CodePointMapData<T>
impl<T> Sync for CodePointMapData<T>
impl<T> ToOwned for CodePointMapData<T>
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> Unpin for CodePointMapData<T>
impl<T> UnsafeUnpin for CodePointMapData<T>
impl<T> UnwindSafe for CodePointMapData<T>
impl<T, U> Into for CodePointMapData<T>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for CodePointMapData<T>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for CodePointMapData<T>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T: $crate::clone::Clone + TrieValue> Clone for CodePointMapData<T>
fn clone(self: &Self) -> CodePointMapData<T>
impl<T: $crate::fmt::Debug + TrieValue> Debug for CodePointMapData<T>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result