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: EnumeratedProperty

Creates a new CodePointMapData for a EnumeratedProperty.

See the documentation on EnumeratedProperty implementations for details.

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

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: EnumeratedProperty

A version of Self::new that uses custom data provided by a DataProvider.

📚 Help choosing a constructor

⚠️ 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>) -> Self

Construct a new one an owned CodePointTrie

fn as_code_point_trie(self: &Self) -> Option<&CodePointTrie<'_, T>>

Convert this type to a CodePointTrie as 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 Option in order to return None when the backing data provider cannot return a CodePointTrie, 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 new CodePointTrie.

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) -> T

Returns 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) -> T
fn 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) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses 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