pub struct ScriptWithExtensionsProperty<'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 ScriptWithExtensionsProperty<'data>
impl<'data> Bake for ScriptWithExtensionsProperty<'data>
Source§fn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
Source§impl<'data> BakeSize for ScriptWithExtensionsProperty<'data>
impl<'data> BakeSize for ScriptWithExtensionsProperty<'data>
Source§fn borrows_size(&self) -> usize
fn borrows_size(&self) -> usize
Source§impl<'data> Clone for ScriptWithExtensionsProperty<'data>
impl<'data> Clone for ScriptWithExtensionsProperty<'data>
Source§fn clone(&self) -> ScriptWithExtensionsProperty<'data>
fn clone(&self) -> ScriptWithExtensionsProperty<'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 ScriptWithExtensionsProperty<'data>
impl<'data> Debug for ScriptWithExtensionsProperty<'data>
Source§impl<'de: 'data, 'data> Deserialize<'de> for ScriptWithExtensionsProperty<'data>
impl<'de: 'data, 'data> Deserialize<'de> for ScriptWithExtensionsProperty<'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 MaybeAsVarULE for ScriptWithExtensionsProperty<'_>
impl MaybeAsVarULE for ScriptWithExtensionsProperty<'_>
Source§type EncodedStruct = [()]
type EncodedStruct = [()]
VarULE
] type for this data struct, or [()]
if it cannot be represented as [VarULE
].Source§impl MaybeEncodeAsVarULE for ScriptWithExtensionsProperty<'_>
impl MaybeEncodeAsVarULE for ScriptWithExtensionsProperty<'_>
Source§fn maybe_encode_as_varule(&self) -> Option<&Self::EncodedStruct>
fn maybe_encode_as_varule(&self) -> Option<&Self::EncodedStruct>
MaybeAsVarULE::EncodedStruct
] that represents this data struct,
or None
if the data struct does not support this representation.Source§impl<'data> PartialEq for ScriptWithExtensionsProperty<'data>
impl<'data> PartialEq for ScriptWithExtensionsProperty<'data>
Source§fn eq(&self, other: &ScriptWithExtensionsProperty<'data>) -> bool
fn eq(&self, other: &ScriptWithExtensionsProperty<'data>) -> bool
self
and other
values to be equal, and is used by ==
.Source§impl<'data> Serialize for ScriptWithExtensionsProperty<'data>
impl<'data> Serialize for ScriptWithExtensionsProperty<'data>
Source§impl<'a> Yokeable<'a> for ScriptWithExtensionsProperty<'static>
impl<'a> Yokeable<'a> for ScriptWithExtensionsProperty<'static>
Source§type Output = ScriptWithExtensionsProperty<'a>
type Output = ScriptWithExtensionsProperty<'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, ScriptWithExtensionsProperty<'zf_inner>> for ScriptWithExtensionsProperty<'zf>
impl<'zf, 'zf_inner> ZeroFrom<'zf, ScriptWithExtensionsProperty<'zf_inner>> for ScriptWithExtensionsProperty<'zf>
Source§fn zero_from(this: &'zf ScriptWithExtensionsProperty<'zf_inner>) -> Self
fn zero_from(this: &'zf ScriptWithExtensionsProperty<'zf_inner>) -> Self
C
into a struct that may retain references into C
.impl<'data> Eq for ScriptWithExtensionsProperty<'data>
impl<'data> StructuralPartialEq for ScriptWithExtensionsProperty<'data>
Auto Trait Implementations§
impl<'data> Freeze for ScriptWithExtensionsProperty<'data>
impl<'data> RefUnwindSafe for ScriptWithExtensionsProperty<'data>
impl<'data> Send for ScriptWithExtensionsProperty<'data>
impl<'data> Sync for ScriptWithExtensionsProperty<'data>
impl<'data> Unpin for ScriptWithExtensionsProperty<'data>
impl<'data> UnwindSafe for ScriptWithExtensionsProperty<'data>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more