Struct icu::properties::provider::ScriptWithExtensionsPropertyV1
source ยท 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> BakeSize for ScriptWithExtensionsPropertyV1<'data>
impl<'data> BakeSize for ScriptWithExtensionsPropertyV1<'data>
sourceยงfn borrows_size(&self) -> usize
fn borrows_size(&self) -> usize
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> Deserialize<'de> for ScriptWithExtensionsPropertyV1<'data>where
'de: 'data,
impl<'de, 'data> Deserialize<'de> for ScriptWithExtensionsPropertyV1<'data>where
'de: 'data,
sourceยงfn 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>,
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ยงfn 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,
sourceยงimpl<'a> Yokeable<'a> for ScriptWithExtensionsPropertyV1<'static>
impl<'a> Yokeable<'a> for ScriptWithExtensionsPropertyV1<'static>
sourceยงtype Output = ScriptWithExtensionsPropertyV1<'a>
type Output = ScriptWithExtensionsPropertyV1<'a>
Self
with the 'static
replaced with 'a
, i.e. Self<'a>
sourceยงfn transform(
&'a self,
) -> &'a <ScriptWithExtensionsPropertyV1<'static> as Yokeable<'a>>::Output
fn transform( &'a self, ) -> &'a <ScriptWithExtensionsPropertyV1<'static> as Yokeable<'a>>::Output
sourceยงfn transform_owned(
self,
) -> <ScriptWithExtensionsPropertyV1<'static> as Yokeable<'a>>::Output
fn transform_owned( self, ) -> <ScriptWithExtensionsPropertyV1<'static> as Yokeable<'a>>::Output
sourceยงunsafe fn make(
this: <ScriptWithExtensionsPropertyV1<'static> as Yokeable<'a>>::Output,
) -> ScriptWithExtensionsPropertyV1<'static>
unsafe fn make( this: <ScriptWithExtensionsPropertyV1<'static> as Yokeable<'a>>::Output, ) -> ScriptWithExtensionsPropertyV1<'static>
Self<'a>
โs lifetime. Read moresourceยงfn 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),
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>,
) -> ScriptWithExtensionsPropertyV1<'zf>
fn zero_from( this: &'zf ScriptWithExtensionsPropertyV1<'zf_inner>, ) -> ScriptWithExtensionsPropertyV1<'zf>
C
into a struct that may retain references into C
.impl<'data> Eq for ScriptWithExtensionsPropertyV1<'data>
impl<'data> StructuralPartialEq for ScriptWithExtensionsPropertyV1<'data>
Auto Trait Implementationsยง
impl<'data> Freeze for ScriptWithExtensionsPropertyV1<'data>
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ยง
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ยงunsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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