Struct PropertyNamesShort

struct PropertyNamesShort<T: NamedEnumeratedProperty> { ... }

A struct capable of looking up a property name from a value Access its data by calling [Self::as_borrowed()] and using the methods on PropertyNamesShortBorrowed.

Example

use icu::properties::props::CanonicalCombiningClass;
use icu::properties::PropertyNamesShort;

let names = PropertyNamesShort::<CanonicalCombiningClass>::new();
assert_eq!(names.get(CanonicalCombiningClass::KanaVoicing), Some("KV"));
assert_eq!(names.get(CanonicalCombiningClass::AboveLeft), Some("AL"));

Implementations

impl<T: NamedEnumeratedProperty> PropertyNamesShort<T>

fn new() -> PropertyNamesShortBorrowed<'static, T>

Creates a new instance of PropertyNamesShortBorrowed<T>.

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

fn try_new_unstable<impl DataProvider<T::DataMarkerShort> + ?Sized: DataProvider<<T as >::DataMarkerShort> + ?Sized>(provider: &impl DataProvider<<T as >::DataMarkerShort> + ?Sized) -> Result<Self, DataError>

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) -> PropertyNamesShortBorrowed<'_, T>

Construct a borrowed version of this type that can be queried.

This avoids a potential small underlying cost per API call (like get_static()) by consolidating it up front.

impl<T> Any for PropertyNamesShort<T>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for PropertyNamesShort<T>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for PropertyNamesShort<T>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> ErasedDestructor for PropertyNamesShort<T>

impl<T> Freeze for PropertyNamesShort<T>

impl<T> From for PropertyNamesShort<T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> RefUnwindSafe for PropertyNamesShort<T>

impl<T> Send for PropertyNamesShort<T>

impl<T> Sync for PropertyNamesShort<T>

impl<T> Unpin for PropertyNamesShort<T>

impl<T> UnsafeUnpin for PropertyNamesShort<T>

impl<T> UnwindSafe for PropertyNamesShort<T>

impl<T, U> Into for PropertyNamesShort<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 PropertyNamesShort<T>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for PropertyNamesShort<T>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>

impl<T: NamedEnumeratedProperty> Debug for PropertyNamesShort<T>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result