Struct unicode_script::ScriptExtension[][src]

#[non_exhaustive]
pub struct ScriptExtension { /* fields omitted */ }
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

Checks if the script extension is Common

Checks if the script extension is Inherited

Checks if the script extension is empty (unknown)

Returns the number of scripts in the script extension

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

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

Find the union between two ScriptExtensions.

“Common” (Zyyy) and “Inherited” (Zinh) are considered as intersecting everything, the union of Common and Inherited is Common

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

Get the intersection of script extensions of all characters in a string.

Iterate over the scripts in this script extension

Will never yield Script::Unknown

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.