Struct PropertyParser
struct PropertyParser<T> { ... }
A struct capable of looking up a property value from a string name.
Access its data by calling [Self::as_borrowed()] and using the methods on
PropertyParserBorrowed.
The name can be a short name (Lu), a long name(Uppercase_Letter),
or an alias.
Property names can be looked up using "strict" matching (looking for a name that matches exactly), or "loose matching", where the name is allowed to deviate in terms of ASCII casing, whitespace, underscores, and hyphens.
Example
use GeneralCategory;
use PropertyParser;
let lookup = new;
// short name for value
assert_eq!;
assert_eq!;
// long name for value
assert_eq!;
assert_eq!;
// name has incorrect casing
assert_eq!;
// loose matching of name
assert_eq!;
// fake property
assert_eq!;
Implementations
impl<T> PropertyParser<T>
fn new() -> PropertyParserBorrowed<'static, T> where T: ParseableEnumeratedPropertyCreates a new instance of
PropertyParser<T>using compiled data.✨ 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: ParseableEnumeratedPropertyA 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) -> PropertyParserBorrowed<'_, T>Construct a borrowed version of this type that can be queried.
This avoids a potential small underlying cost per API call (like
get_strict()) by consolidating it up front.
impl<T> Any for PropertyParser<T>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for PropertyParser<T>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for PropertyParser<T>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> ErasedDestructor for PropertyParser<T>
impl<T> Freeze for PropertyParser<T>
impl<T> From for PropertyParser<T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> RefUnwindSafe for PropertyParser<T>
impl<T> Send for PropertyParser<T>
impl<T> Sync for PropertyParser<T>
impl<T> Unpin for PropertyParser<T>
impl<T> UnsafeUnpin for PropertyParser<T>
impl<T> UnwindSafe for PropertyParser<T>
impl<T, U> Into for PropertyParser<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 PropertyParser<T>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for PropertyParser<T>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T: $crate::fmt::Debug> Debug for PropertyParser<T>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result