#[non_exhaustive]pub struct ScriptExtension { /* private fields */ }
Expand description
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
Implementations§
Source§impl ScriptExtension
impl ScriptExtension
Sourcepub const fn is_inherited(self) -> bool
pub const fn is_inherited(self) -> bool
Checks if the script extension is Inherited
Sourcepub fn intersect_with(&mut self, other: Self)
pub fn intersect_with(&mut self, other: Self)
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
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
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
Sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
Find the union between two ScriptExtensions.
“Common” (Zyyy
) and “Inherited” (Zinh
) are considered as intersecting
everything, the union of Common
and Inherited
is Common
Sourcepub fn contains_script(self, script: Script) -> bool
pub fn contains_script(self, script: Script) -> bool
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
Sourcepub fn for_str(x: &str) -> Self
pub fn for_str(x: &str) -> Self
Get the intersection of script extensions of all characters in a string.
Sourcepub fn iter(self) -> ScriptIterator ⓘ
pub fn iter(self) -> ScriptIterator ⓘ
Iterate over the scripts in this script extension
Will never yield Script::Unknown
Trait Implementations§
Source§impl Clone for ScriptExtension
impl Clone for ScriptExtension
Source§fn clone(&self) -> ScriptExtension
fn clone(&self) -> ScriptExtension
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more