pub struct PropertyValueNameToEnumMapper(/* private fields */);
Expand description
A type capable of looking up a property value from a string name.
Implementations§
source§impl PropertyValueNameToEnumMapper
impl PropertyValueNameToEnumMapper
sourcepub fn get_strict(&self, name: &DiplomatStr) -> i16
pub fn get_strict(&self, name: &DiplomatStr) -> i16
Get the property value matching the given name, using strict matching
Returns -1 if the name is unknown for this property
sourcepub fn get_loose(&self, name: &DiplomatStr) -> i16
pub fn get_loose(&self, name: &DiplomatStr) -> i16
Get the property value matching the given name, using loose matching
Returns -1 if the name is unknown for this property
sourcepub fn create_general_category() -> Box<PropertyValueNameToEnumMapper>
pub fn create_general_category() -> Box<PropertyValueNameToEnumMapper>
Create a name-to-enum mapper for the General_Category
property, using compiled data.
sourcepub fn create_general_category_with_provider(
provider: &DataProvider,
) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
pub fn create_general_category_with_provider( provider: &DataProvider, ) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
Create a name-to-enum mapper for the General_Category
property, using a particular data source.
sourcepub fn create_hangul_syllable_type() -> Box<PropertyValueNameToEnumMapper>
pub fn create_hangul_syllable_type() -> Box<PropertyValueNameToEnumMapper>
Create a name-to-enum mapper for the Hangul_Syllable_Type
property, using compiled data.
sourcepub fn create_hangul_syllable_type_with_provider(
provider: &DataProvider,
) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
pub fn create_hangul_syllable_type_with_provider( provider: &DataProvider, ) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
Create a name-to-enum mapper for the Hangul_Syllable_Type
property, using a particular data source.
sourcepub fn create_east_asian_width() -> Box<PropertyValueNameToEnumMapper>
pub fn create_east_asian_width() -> Box<PropertyValueNameToEnumMapper>
Create a name-to-enum mapper for the East_Asian_Width
property, using compiled data.
sourcepub fn create_east_asian_width_with_provider(
provider: &DataProvider,
) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
pub fn create_east_asian_width_with_provider( provider: &DataProvider, ) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
Create a name-to-enum mapper for the East_Asian_Width
property, using a particular data source.
sourcepub fn create_bidi_class() -> Box<PropertyValueNameToEnumMapper>
pub fn create_bidi_class() -> Box<PropertyValueNameToEnumMapper>
Create a name-to-enum mapper for the Bidi_Class
property, using compiled data.
sourcepub fn create_bidi_class_with_provider(
provider: &DataProvider,
) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
pub fn create_bidi_class_with_provider( provider: &DataProvider, ) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
Create a name-to-enum mapper for the Bidi_Class
property, using a particular data source.
sourcepub fn create_indic_syllabic_category() -> Box<PropertyValueNameToEnumMapper>
pub fn create_indic_syllabic_category() -> Box<PropertyValueNameToEnumMapper>
Create a name-to-enum mapper for the Indic_Syllabic_Category
property, using compiled data.
sourcepub fn create_indic_syllabic_category_with_provider(
provider: &DataProvider,
) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
pub fn create_indic_syllabic_category_with_provider( provider: &DataProvider, ) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
Create a name-to-enum mapper for the Indic_Syllabic_Category
property, using a particular data source.
sourcepub fn create_line_break() -> Box<PropertyValueNameToEnumMapper>
pub fn create_line_break() -> Box<PropertyValueNameToEnumMapper>
Create a name-to-enum mapper for the Line_Break
property, using compiled data.
sourcepub fn create_line_break_with_provider(
provider: &DataProvider,
) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
pub fn create_line_break_with_provider( provider: &DataProvider, ) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
Create a name-to-enum mapper for the Line_Break
property, using a particular data source.
sourcepub fn create_grapheme_cluster_break() -> Box<PropertyValueNameToEnumMapper>
pub fn create_grapheme_cluster_break() -> Box<PropertyValueNameToEnumMapper>
Create a name-to-enum mapper for the Grapheme_Cluster_Break
property, using compiled data.
sourcepub fn create_grapheme_cluster_break_with_provider(
provider: &DataProvider,
) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
pub fn create_grapheme_cluster_break_with_provider( provider: &DataProvider, ) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
Create a name-to-enum mapper for the Grapheme_Cluster_Break
property, using a particular data source.
sourcepub fn create_word_break() -> Box<PropertyValueNameToEnumMapper>
pub fn create_word_break() -> Box<PropertyValueNameToEnumMapper>
Create a name-to-enum mapper for the Word_Break
property, using compiled data.
sourcepub fn create_word_break_with_provider(
provider: &DataProvider,
) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
pub fn create_word_break_with_provider( provider: &DataProvider, ) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
Create a name-to-enum mapper for the Word_Break
property, using a particular data source.
sourcepub fn create_sentence_break() -> Box<PropertyValueNameToEnumMapper>
pub fn create_sentence_break() -> Box<PropertyValueNameToEnumMapper>
Create a name-to-enum mapper for the Sentence_Break
property, using compiled data.
sourcepub fn create_sentence_break_with_provider(
provider: &DataProvider,
) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
pub fn create_sentence_break_with_provider( provider: &DataProvider, ) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
Create a name-to-enum mapper for the Sentence_Break
property, using a particular data source.
sourcepub fn create_script() -> Box<PropertyValueNameToEnumMapper>
pub fn create_script() -> Box<PropertyValueNameToEnumMapper>
Create a name-to-enum mapper for the Script
property, using compiled data.
sourcepub fn create_script_with_provider(
provider: &DataProvider,
) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
pub fn create_script_with_provider( provider: &DataProvider, ) -> Result<Box<PropertyValueNameToEnumMapper>, DataError>
Create a name-to-enum mapper for the Script
property, using a particular data source.
Auto Trait Implementations§
impl Freeze for PropertyValueNameToEnumMapper
impl RefUnwindSafe for PropertyValueNameToEnumMapper
impl Send for PropertyValueNameToEnumMapper
impl Sync for PropertyValueNameToEnumMapper
impl Unpin for PropertyValueNameToEnumMapper
impl UnwindSafe for PropertyValueNameToEnumMapper
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more