Struct icu::properties::provider::ScriptWithExtensionsPropertyV1
source · [−]pub struct ScriptWithExtensionsPropertyV1<'data> {
pub trie: CodePointTrie<'data, ScriptWithExt>,
pub extensions: VarZeroVec<'data, ZeroSlice<Script>, Index16>,
}
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>, Index16>
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
sourceimpl<'data> Bake for ScriptWithExtensionsPropertyV1<'data>
impl<'data> Bake for ScriptWithExtensionsPropertyV1<'data>
sourcefn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
Returns a TokenStream
that would evaluate to self
. Read more
sourceimpl<'data> Clone for ScriptWithExtensionsPropertyV1<'data>
impl<'data> Clone for ScriptWithExtensionsPropertyV1<'data>
sourcefn clone(&self) -> ScriptWithExtensionsPropertyV1<'data>
fn clone(&self) -> ScriptWithExtensionsPropertyV1<'data>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'data> Debug for ScriptWithExtensionsPropertyV1<'data>
impl<'data> Debug for ScriptWithExtensionsPropertyV1<'data>
sourceimpl<'de, 'data> Deserialize<'de> for ScriptWithExtensionsPropertyV1<'data> where
'de: 'data,
impl<'de, 'data> Deserialize<'de> for ScriptWithExtensionsPropertyV1<'data> where
'de: 'data,
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<ScriptWithExtensionsPropertyV1<'data>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ScriptWithExtensionsPropertyV1<'data>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'data> PartialEq<ScriptWithExtensionsPropertyV1<'data>> for ScriptWithExtensionsPropertyV1<'data>
impl<'data> PartialEq<ScriptWithExtensionsPropertyV1<'data>> for ScriptWithExtensionsPropertyV1<'data>
sourcefn eq(&self, other: &ScriptWithExtensionsPropertyV1<'data>) -> bool
fn eq(&self, other: &ScriptWithExtensionsPropertyV1<'data>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ScriptWithExtensionsPropertyV1<'data>) -> bool
fn ne(&self, other: &ScriptWithExtensionsPropertyV1<'data>) -> bool
This method tests for !=
.
sourceimpl<'data> Serialize for ScriptWithExtensionsPropertyV1<'data>
impl<'data> Serialize for ScriptWithExtensionsPropertyV1<'data>
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
sourceimpl<'a> Yokeable<'a> for ScriptWithExtensionsPropertyV1<'static>
impl<'a> Yokeable<'a> for ScriptWithExtensionsPropertyV1<'static>
type Output = ScriptWithExtensionsPropertyV1<'a>
type Output = ScriptWithExtensionsPropertyV1<'a>
This type MUST be Self
with the 'static
replaced with 'a
, i.e. Self<'a>
sourcefn transform(
&'a self
) -> &'a <ScriptWithExtensionsPropertyV1<'static> as Yokeable<'a>>::Output
fn transform(
&'a self
) -> &'a <ScriptWithExtensionsPropertyV1<'static> as Yokeable<'a>>::Output
This method must cast self
between &'a Self<'static>
and &'a Self<'a>
. Read more
sourcefn transform_owned(
self
) -> <ScriptWithExtensionsPropertyV1<'static> as Yokeable<'a>>::Output
fn transform_owned(
self
) -> <ScriptWithExtensionsPropertyV1<'static> as Yokeable<'a>>::Output
This method must cast self
between Self<'static>
and Self<'a>
. Read more
sourceunsafe fn make(
this: <ScriptWithExtensionsPropertyV1<'static> as Yokeable<'a>>::Output
) -> ScriptWithExtensionsPropertyV1<'static>
unsafe fn make(
this: <ScriptWithExtensionsPropertyV1<'static> as Yokeable<'a>>::Output
) -> ScriptWithExtensionsPropertyV1<'static>
This method can be used to cast away Self<'a>
’s lifetime. Read more
sourcefn transform_mut<F>(&'a mut self, f: F) where
F: 'static + for<'b> FnOnce(&'b mut <ScriptWithExtensionsPropertyV1<'static> as Yokeable<'a>>::Output),
fn transform_mut<F>(&'a mut self, f: F) where
F: 'static + for<'b> FnOnce(&'b mut <ScriptWithExtensionsPropertyV1<'static> as Yokeable<'a>>::Output),
This method must cast self
between &'a mut Self<'static>
and &'a mut Self<'a>
,
and pass it to f
. Read more
sourceimpl<'zf, 'zf_inner> ZeroFrom<'zf, ScriptWithExtensionsPropertyV1<'zf_inner>> for ScriptWithExtensionsPropertyV1<'zf>
impl<'zf, 'zf_inner> ZeroFrom<'zf, ScriptWithExtensionsPropertyV1<'zf_inner>> for ScriptWithExtensionsPropertyV1<'zf>
sourcefn zero_from(
this: &'zf ScriptWithExtensionsPropertyV1<'zf_inner>
) -> ScriptWithExtensionsPropertyV1<'zf>
fn zero_from(
this: &'zf ScriptWithExtensionsPropertyV1<'zf_inner>
) -> ScriptWithExtensionsPropertyV1<'zf>
Clone the other C
into a struct that may retain references into C
.
impl<'data> Eq for ScriptWithExtensionsPropertyV1<'data>
impl<'a> IsCovariant<'a> for ScriptWithExtensionsPropertyV1<'a>
impl<'data> StructuralEq for ScriptWithExtensionsPropertyV1<'data>
impl<'data> StructuralPartialEq for ScriptWithExtensionsPropertyV1<'data>
Auto Trait Implementations
impl<'data> RefUnwindSafe for ScriptWithExtensionsPropertyV1<'data>
impl<'data> Send for ScriptWithExtensionsPropertyV1<'data>
impl<'data> Sync for ScriptWithExtensionsPropertyV1<'data>
impl<'data> Unpin for ScriptWithExtensionsPropertyV1<'data>
impl<'data> UnwindSafe for ScriptWithExtensionsPropertyV1<'data>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Serialize for T where
T: Serialize + ?Sized,
impl<T> Serialize for T where
T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more