pub struct ScriptWithExtensionsPropertyV1<'data> {
pub trie: CodePointTrie<'data, ScriptWithExt>,
pub extensions: VarZeroVec<'data, ZeroSlice<Script>>,
}
Expand description
A struct that efficiently stores Script
and Script_Extensions
property data.
Fields§
§trie: CodePointTrie<'data, ScriptWithExt>
Note: The ScriptWithExt
values in this array will assume a 12-bit layout. The 2
higher order bits 11..10 will indicate how to deduce the Script value and
Script_Extensions value, nearly matching the representation
in ICU:
High order 2 bits value | Script | Script_Extensions |
---|---|---|
3 | First value in sub-array, index given by lower 10 bits | Sub-array excluding first value, index given by lower 10 bits |
2 | Script=Inherited | Entire sub-array, index given by lower 10 bits |
1 | Script=Common | Entire sub-array, index given by lower 10 bits |
0 | Value in lower 10 bits | [ Script value ] single-element array |
When the lower 10 bits of the value are used as an index, that index is
used for the outer-level vector of the nested extensions
structure.
extensions: VarZeroVec<'data, ZeroSlice<Script>>
This companion structure stores Script_Extensions values, which are
themselves arrays / vectors. This structure only stores the values for
cases in which scx(cp) != [ sc(cp) ]
. Each sub-vector is distinct. The
sub-vector represents the Script_Extensions array value for a code point,
and may also indicate Script value, as described for the trie
field.
Trait Implementations§
source§impl<'data> Bake for ScriptWithExtensionsPropertyV1<'data>
impl<'data> Bake for ScriptWithExtensionsPropertyV1<'data>
source§fn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
source§impl<'data> Clone for ScriptWithExtensionsPropertyV1<'data>
impl<'data> Clone for ScriptWithExtensionsPropertyV1<'data>
source§fn clone(&self) -> ScriptWithExtensionsPropertyV1<'data>
fn clone(&self) -> ScriptWithExtensionsPropertyV1<'data>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'data> Debug for ScriptWithExtensionsPropertyV1<'data>
impl<'data> Debug for ScriptWithExtensionsPropertyV1<'data>
source§impl<'de: 'data, 'data> Deserialize<'de> for ScriptWithExtensionsPropertyV1<'data>
impl<'de: 'data, 'data> Deserialize<'de> for ScriptWithExtensionsPropertyV1<'data>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl<'data> PartialEq for ScriptWithExtensionsPropertyV1<'data>
impl<'data> PartialEq for ScriptWithExtensionsPropertyV1<'data>
source§fn eq(&self, other: &ScriptWithExtensionsPropertyV1<'data>) -> bool
fn eq(&self, other: &ScriptWithExtensionsPropertyV1<'data>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<'data> Serialize for ScriptWithExtensionsPropertyV1<'data>
impl<'data> Serialize for ScriptWithExtensionsPropertyV1<'data>
source§impl<'a> Yokeable<'a> for ScriptWithExtensionsPropertyV1<'static>
impl<'a> Yokeable<'a> for ScriptWithExtensionsPropertyV1<'static>
§type Output = ScriptWithExtensionsPropertyV1<'a>
type Output = ScriptWithExtensionsPropertyV1<'a>
Self
with the 'static
replaced with 'a
, i.e. Self<'a>
source§fn transform_owned(self) -> Self::Output
fn transform_owned(self) -> Self::Output
source§unsafe fn make(this: Self::Output) -> Self
unsafe fn make(this: Self::Output) -> Self
Self<'a>
’s lifetime. Read moresource§fn transform_mut<F>(&'a mut self, f: F)where
F: 'static + for<'b> FnOnce(&'b mut Self::Output),
fn transform_mut<F>(&'a mut self, f: F)where F: 'static + for<'b> FnOnce(&'b mut Self::Output),
self
between &'a mut Self<'static>
and &'a mut Self<'a>
,
and pass it to f
. Read moresource§impl<'zf, 'zf_inner> ZeroFrom<'zf, ScriptWithExtensionsPropertyV1<'zf_inner>> for ScriptWithExtensionsPropertyV1<'zf>
impl<'zf, 'zf_inner> ZeroFrom<'zf, ScriptWithExtensionsPropertyV1<'zf_inner>> for ScriptWithExtensionsPropertyV1<'zf>
source§fn zero_from(this: &'zf ScriptWithExtensionsPropertyV1<'zf_inner>) -> Self
fn zero_from(this: &'zf ScriptWithExtensionsPropertyV1<'zf_inner>) -> Self
C
into a struct that may retain references into C
.