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
.
Note: Due to branching and indirection, using PropertyEnumToValueNameLinearTiny4Mapper
might inhibit some
compile-time optimizations that are possible with PropertyEnumToValueNameLinearTiny4MapperBorrowed
.
Trait Implementations§
Source§impl<'a, T: Clone> Clone for PropertyEnumToValueNameLinearTiny4MapperBorrowed<'a, T>
impl<'a, T: Clone> Clone for PropertyEnumToValueNameLinearTiny4MapperBorrowed<'a, T>
Source§fn clone(&self) -> PropertyEnumToValueNameLinearTiny4MapperBorrowed<'a, T>
fn clone(&self) -> PropertyEnumToValueNameLinearTiny4MapperBorrowed<'a, T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a, T: Debug> Debug for PropertyEnumToValueNameLinearTiny4MapperBorrowed<'a, T>
impl<'a, T: Debug> Debug for PropertyEnumToValueNameLinearTiny4MapperBorrowed<'a, T>
impl<'a, T: Copy> Copy for PropertyEnumToValueNameLinearTiny4MapperBorrowed<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for PropertyEnumToValueNameLinearTiny4MapperBorrowed<'a, T>
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