[−][src]Struct unicode_script::ScriptExtension
A value for the Script_Extension
property
ScriptExtension
is one or more Script
This is essentially an optimized version of Vec<Script>
that uses bitfields
Methods
impl ScriptExtension
[src]
pub const fn is_common(self) -> bool
[src]
Checks if the script extension is Common
pub const fn is_inherited(self) -> bool
[src]
Checks if the script extension is Inherited
pub const fn is_empty(self) -> bool
[src]
Checks if the script extension is empty (unknown)
pub fn intersect_with(&mut self, other: Self)
[src]
Intersect this ScriptExtension
with another ScriptExtension
. Produces Unknown
if things
do not intersect. This is equivalent to ScriptExtension::intersection
but it stores the result
in self
"Common" (Zyyy
) and "Inherited" (Zinh
) are considered as intersecting
everything, the intersection of Common
and Inherited
is Inherited
pub const fn intersection(self, other: Self) -> Self
[src]
Find the intersection between two ScriptExtensions. Returns Unknown if things do not intersect.
"Common" (Zyyy
) and "Inherited" (Zinh
) are considered as intersecting
everything, the intersection of Common
and Inherited
is Inherited
pub const fn union(self, other: Self) -> Self
[src]
Find the union between two ScriptExtensions.
"Common" (Zyyy
) and "Inherited" (Zinh
) are considered as intersecting
everything, the union of Common
and Inherited
is Common
pub fn contains_script(self, script: Script) -> bool
[src]
Check if this ScriptExtension contains the given script
Should be used with specific scripts only, this will
return true
if self
is not Unknown
and script
is
Common
or Inherited
pub fn for_str(x: &str) -> Self
[src]
Get the intersection of script extensions of all characters in a string.
ⓘImportant traits for ScriptIteratorpub fn iter(self) -> ScriptIterator
[src]
Iterate over the scripts in this string
Will never yeild Script::Unknown
Trait Implementations
impl Clone for ScriptExtension
[src]
fn clone(&self) -> ScriptExtension
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ScriptExtension
[src]
impl Debug for ScriptExtension
[src]
impl Default for ScriptExtension
[src]
impl Eq for ScriptExtension
[src]
impl<'_> From<&'_ str> for ScriptExtension
[src]
impl From<Script> for ScriptExtension
[src]
impl From<char> for ScriptExtension
[src]
impl Hash for ScriptExtension
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<ScriptExtension> for ScriptExtension
[src]
fn eq(&self, other: &ScriptExtension) -> bool
[src]
fn ne(&self, other: &ScriptExtension) -> bool
[src]
impl StructuralEq for ScriptExtension
[src]
impl StructuralPartialEq for ScriptExtension
[src]
impl TryFrom<ScriptExtension> for Script
[src]
type Error = ()
The type returned in the event of a conversion error.
fn try_from(ext: ScriptExtension) -> Result<Self, ()>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,