Struct icu_capi::script::ffi::ScriptWithExtensions
source · pub struct ScriptWithExtensions(pub ScriptWithExtensions);
Expand description
An ICU4X ScriptWithExtensions map object, capable of holding a map of codepoints to scriptextensions values
Tuple Fields§
§0: ScriptWithExtensions
Implementations§
source§impl ScriptWithExtensions
impl ScriptWithExtensions
sourcepub fn create() -> Box<ScriptWithExtensions>
pub fn create() -> Box<ScriptWithExtensions>
Create a map for the Script
/Script_Extensions
properties, using compiled data.
sourcepub fn create_with_provider(
provider: &DataProvider,
) -> Result<Box<ScriptWithExtensions>, DataError>
pub fn create_with_provider( provider: &DataProvider, ) -> Result<Box<ScriptWithExtensions>, DataError>
Create a map for the Script
/Script_Extensions
properties, using compiled data.
sourcepub fn get_script_val(&self, ch: DiplomatChar) -> u16
pub fn get_script_val(&self, ch: DiplomatChar) -> u16
Get the Script property value for a code point
sourcepub fn has_script(&self, ch: DiplomatChar, script: u16) -> bool
pub fn has_script(&self, ch: DiplomatChar, script: u16) -> bool
Check if the Script_Extensions property of the given code point covers the given script
sourcepub fn as_borrowed<'a>(&'a self) -> Box<ScriptWithExtensionsBorrowed<'a>>
pub fn as_borrowed<'a>(&'a self) -> Box<ScriptWithExtensionsBorrowed<'a>>
Borrow this object for a slightly faster variant with more operations
sourcepub fn iter_ranges_for_script<'a>(
&'a self,
script: u16,
) -> Box<CodePointRangeIterator<'a>>
pub fn iter_ranges_for_script<'a>( &'a self, script: u16, ) -> Box<CodePointRangeIterator<'a>>
Get a list of ranges of code points that contain this script in their Script_Extensions values
Auto Trait Implementations§
impl Freeze for ScriptWithExtensions
impl RefUnwindSafe for ScriptWithExtensions
impl Send for ScriptWithExtensions
impl Sync for ScriptWithExtensions
impl Unpin for ScriptWithExtensions
impl UnwindSafe for ScriptWithExtensions
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
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>
Converts
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>
Converts
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