pub struct PropertyEnumToValueNameLinearTiny4MapperBorrowed<'a, T> { /* private fields */ }
Expand description
A borrowed wrapper around property value name-to-enum data, returned by
PropertyEnumToValueNameLinearTiny4Mapper::as_borrowed()
. More efficient to query.
Implementations§
source§impl<T: TrieValue> PropertyEnumToValueNameLinearTiny4MapperBorrowed<'_, T>
impl<T: TrieValue> PropertyEnumToValueNameLinearTiny4MapperBorrowed<'_, T>
sourcepub fn get(&self, property: T) -> Option<TinyStr4>
pub fn get(&self, property: T) -> Option<TinyStr4>
Get the property name given a value
Example
use icu::properties::Script;
use tinystr::tinystr;
let lookup = Script::enum_to_short_name_mapper();
assert_eq!(lookup.get(Script::Brahmi), Some(tinystr!(4, "Brah")));
assert_eq!(lookup.get(Script::Hangul), Some(tinystr!(4, "Hang")));
source§impl<T: TrieValue> PropertyEnumToValueNameLinearTiny4MapperBorrowed<'static, T>
impl<T: TrieValue> PropertyEnumToValueNameLinearTiny4MapperBorrowed<'static, T>
sourcepub const fn static_to_owned(
self
) -> PropertyEnumToValueNameLinearTiny4Mapper<T>
pub const fn static_to_owned( self ) -> PropertyEnumToValueNameLinearTiny4Mapper<T>
Cheaply converts a PropertyEnumToValueNameLinearTiny4MapperBorrowed<'static>
into a PropertyEnumToValueNameLinearTiny4Mapper
.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> RefUnwindSafe for PropertyEnumToValueNameLinearTiny4MapperBorrowed<'a, T>
impl<'a, T> Send for PropertyEnumToValueNameLinearTiny4MapperBorrowed<'a, T>
impl<'a, T> Sync for PropertyEnumToValueNameLinearTiny4MapperBorrowed<'a, T>
impl<'a, T> Unpin for PropertyEnumToValueNameLinearTiny4MapperBorrowed<'a, T>
impl<'a, T> UnwindSafe for PropertyEnumToValueNameLinearTiny4MapperBorrowed<'a, T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more