Struct Script
struct Script(_)
Enumerated property Script.
This is used with both the Script and Script_Extensions Unicode properties.
Each character is assigned a single Script, but characters that are used in
a particular subset of scripts will be in more than one Script_Extensions set.
For example, DEVANAGARI DIGIT NINE has Script=Devanagari, but is also in the
Script_Extensions set for Dogra, Kaithi, and Mahajani. If you are trying to
determine whether a code point belongs to a certain script, you should use
ScriptWithExtensionsBorrowed::has_script.
For more information, see UAX #24: http://www.unicode.org/reports/tr24/.
See UScriptCode in ICU4C.
Example
use ;
assert_eq!; // U+6728
assert_eq!; // U+1F383 JACK-O-LANTERN
Implementations
impl Script
const fn to_icu4c_value(self: Self) -> u16Returns an ICU4C
UScriptCodevalue.const fn from_icu4c_value(value: u16) -> SelfConstructor from an ICU4C
UScriptCodevalue.
impl Script
impl AsULE for Script
fn to_unaligned(self: Self) -> <Self as >::ULEfn from_unaligned(unaligned: <Self as >::ULE) -> Self
impl Clone for Script
fn clone(self: &Self) -> Script
impl Copy for Script
impl Debug for Script
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl EnumeratedProperty for Script
impl Eq for Script
impl Freeze for Script
impl Hash for Script
fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)
impl NamedEnumeratedProperty for Script
impl Ord for Script
fn cmp(self: &Self, other: &Script) -> Ordering
impl ParseableEnumeratedProperty for Script
impl PartialEq for Script
fn eq(self: &Self, other: &Script) -> bool
impl PartialOrd for Script
fn partial_cmp(self: &Self, other: &Script) -> Option<Ordering>
impl RefUnwindSafe for Script
impl Send for Script
impl StructuralPartialEq for Script
impl Sync for Script
impl TrieValue for Script
fn try_from_u32(i: u32) -> Result<Self, <Self as >::TryFromU32Error>fn to_u32(self: Self) -> u32
impl Unpin for Script
impl UnsafeUnpin for Script
impl UnwindSafe for Script
impl<T> Any for Script
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Script
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Script
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Script
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> ErasedDestructor for Script
impl<T> From for Script
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Script
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for Script
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Script
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Script
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>