Struct PropertyNamesShortBorrowed
struct PropertyNamesShortBorrowed<'a, T: NamedEnumeratedProperty> { ... }
A borrowed wrapper around property value name-to-enum data, returned by
[PropertyNamesShort::as_borrowed()]. More efficient to query.
Implementations
impl PropertyNamesShortBorrowed<'_, Script>
fn get_locale_script(self: Self, property: Script) -> Option<Script>Gets the "name" of a script property as a
icu::locale::subtags::Script.This method is available only on
PropertyNamesShortBorrowed<Script>.Example
use script; use Script; use PropertyNamesShort; let lookup = new; assert_eq!; assert_eq!;For the reverse direction, use property parsing as normal:
use script; use Script; use PropertyParser; let parser = new; assert_eq!; assert_eq!;
impl<'a, T: NamedEnumeratedProperty> PropertyNamesShortBorrowed<'a, T>
fn get(self: Self, property: T) -> Option<&'a str>Get the property name given a value
Example
use CanonicalCombiningClass; use PropertyNamesShort; let lookup = new; assert_eq!; assert_eq!;
impl<T: NamedEnumeratedProperty> PropertyNamesShortBorrowed<'static, T>
fn new() -> SelfCreates a new instance of
PropertyNamesShortBorrowed<T>.✨ Enabled with the
compiled_dataCargo feature.fn static_to_owned(self: Self) -> PropertyNamesShort<T>Cheaply converts a [
PropertyNamesShortBorrowed<'static>] into aPropertyNamesShort.Note: Due to branching and indirection, using
PropertyNamesShortmight inhibit some compile-time optimizations that are possible withPropertyNamesShortBorrowed.This is currently not
constunlike otherstatic_to_owned()functions since it needs const traits to do that safely
impl<'a, T> Freeze for PropertyNamesShortBorrowed<'a, T>
impl<'a, T> RefUnwindSafe for PropertyNamesShortBorrowed<'a, T>
impl<'a, T> Send for PropertyNamesShortBorrowed<'a, T>
impl<'a, T> Sync for PropertyNamesShortBorrowed<'a, T>
impl<'a, T> Unpin for PropertyNamesShortBorrowed<'a, T>
impl<'a, T> UnsafeUnpin for PropertyNamesShortBorrowed<'a, T>
impl<'a, T> UnwindSafe for PropertyNamesShortBorrowed<'a, T>
impl<'a, T: $crate::fmt::Debug + NamedEnumeratedProperty> Debug for PropertyNamesShortBorrowed<'a, T>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<T> Any for PropertyNamesShortBorrowed<'a, T>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for PropertyNamesShortBorrowed<'a, T>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for PropertyNamesShortBorrowed<'a, T>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for PropertyNamesShortBorrowed<'a, T>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> ErasedDestructor for PropertyNamesShortBorrowed<'a, T>
impl<T> From for PropertyNamesShortBorrowed<'a, T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for PropertyNamesShortBorrowed<'a, T>
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for PropertyNamesShortBorrowed<'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 PropertyNamesShortBorrowed<'a, T>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for PropertyNamesShortBorrowed<'a, T>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T: NamedEnumeratedProperty> Clone for PropertyNamesShortBorrowed<'_, T>
fn clone(self: &Self) -> Self
impl<T: NamedEnumeratedProperty> Copy for PropertyNamesShortBorrowed<'_, T>
impl<T: NamedEnumeratedProperty> Default for PropertyNamesShortBorrowed<'static, T>
fn default() -> Self