Struct PropertyParserBorrowed
struct PropertyParserBorrowed<'a, T> { ... }
A borrowed wrapper around property value name-to-enum data, returned by
[PropertyParser::as_borrowed()]. More efficient to query.
Implementations
impl<T: TrieValue> PropertyParserBorrowed<'_, T>
fn get_strict_u16(self: Self, name: &str) -> Option<u16>Get the property value as a u16, doing a strict search looking for names that match exactly
Example
use GeneralCategory; use PropertyParser; let lookup = new; assert_eq!; assert_eq!; // does not do loose matching assert_eq!;fn get_strict(self: Self, name: &str) -> Option<T>Get the property value as a
T, doing a strict search looking for names that match exactlyExample
use GeneralCategory; use PropertyParser; let lookup = new; assert_eq!; assert_eq!; // does not do loose matching assert_eq!;fn get_loose_u16(self: Self, name: &str) -> Option<u16>Get the property value as a u16, doing a loose search looking for names that match case-insensitively, ignoring ASCII hyphens, underscores, and whitespaces.
Example
use GeneralCategory; use PropertyParser; let lookup = new; assert_eq!; assert_eq!; // does do loose matching assert_eq!;fn get_loose(self: Self, name: &str) -> Option<T>Get the property value as a
T, doing a loose search looking for names that match case-insensitively, ignoring ASCII hyphens, underscores, and whitespaces.Example
use GeneralCategory; use PropertyParser; let lookup = new; assert_eq!; assert_eq!; // does do loose matching assert_eq!;
impl<T: TrieValue> PropertyParserBorrowed<'static, T>
fn new() -> Self where T: ParseableEnumeratedPropertyCreates a new instance of
PropertyParserBorrowed<T>using compiled data.✨ Enabled with the
compiled_dataCargo feature.const fn static_to_owned(self: Self) -> PropertyParser<T>Cheaply converts a [
PropertyParserBorrowed<'static>] into aPropertyParser.Note: Due to branching and indirection, using
PropertyParsermight inhibit some compile-time optimizations that are possible withPropertyParserBorrowed.
impl<'a, T> Freeze for PropertyParserBorrowed<'a, T>
impl<'a, T> RefUnwindSafe for PropertyParserBorrowed<'a, T>
impl<'a, T> Send for PropertyParserBorrowed<'a, T>
impl<'a, T> Sync for PropertyParserBorrowed<'a, T>
impl<'a, T> Unpin for PropertyParserBorrowed<'a, T>
impl<'a, T> UnsafeUnpin for PropertyParserBorrowed<'a, T>
impl<'a, T> UnwindSafe for PropertyParserBorrowed<'a, T>
impl<'a, T: $crate::fmt::Debug> Debug for PropertyParserBorrowed<'a, T>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<T> Any for PropertyParserBorrowed<'a, T>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for PropertyParserBorrowed<'a, T>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for PropertyParserBorrowed<'a, T>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> Clone for PropertyParserBorrowed<'_, T>
fn clone(self: &Self) -> Self
impl<T> CloneToUninit for PropertyParserBorrowed<'a, T>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> Copy for PropertyParserBorrowed<'_, T>
impl<T> ErasedDestructor for PropertyParserBorrowed<'a, T>
impl<T> From for PropertyParserBorrowed<'a, T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for PropertyParserBorrowed<'a, T>
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for PropertyParserBorrowed<'a, 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 PropertyParserBorrowed<'a, T>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for PropertyParserBorrowed<'a, T>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T: ParseableEnumeratedProperty> Default for PropertyParserBorrowed<'static, T>
fn default() -> Self