Struct icu::plurals::provider::PluralElementsPackedCow
source · pub struct PluralElementsPackedCow<'data, V>{
pub elements: Cow<'data, PluralElementsPackedULE<V>>,
}
Expand description
A sized packed PluralElements
suitable for use in data structs.
This type has the following limitations:
- It only supports
str
- It does not implement
VarULE
so it can’t be used in aVarZeroSlice
- It always serializes the
FourBitMetadata
as 0
Use PluralElementsPackedULE
directly if you need these additional features.
Fields§
§elements: Cow<'data, PluralElementsPackedULE<V>>
The encoded elements.
Implementations§
source§impl<V> PluralElementsPackedCow<'_, V>
impl<V> PluralElementsPackedCow<'_, V>
sourcepub fn get<'a>(&'a self, op: PluralOperands, rules: &PluralRules) -> &'a V
pub fn get<'a>(&'a self, op: PluralOperands, rules: &PluralRules) -> &'a V
Returns the value for the given PluralOperands
and PluralRules
.
Trait Implementations§
source§impl<'data, V> Bake for PluralElementsPackedCow<'data, V>
impl<'data, V> Bake for PluralElementsPackedCow<'data, V>
source§fn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
source§impl<'data, V> BakeSize for PluralElementsPackedCow<'data, V>
impl<'data, V> BakeSize for PluralElementsPackedCow<'data, V>
source§fn borrows_size(&self) -> usize
fn borrows_size(&self) -> usize
Returns the size
source§impl<V> Clone for PluralElementsPackedCow<'_, V>
impl<V> Clone for PluralElementsPackedCow<'_, V>
source§fn clone(&self) -> PluralElementsPackedCow<'_, V>
fn clone(&self) -> PluralElementsPackedCow<'_, V>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'data, V> Debug for PluralElementsPackedCow<'data, V>
impl<'data, V> Debug for PluralElementsPackedCow<'data, V>
source§impl<'de, 'data, V> Deserialize<'de> for PluralElementsPackedCow<'data, V>
impl<'de, 'data, V> Deserialize<'de> for PluralElementsPackedCow<'data, V>
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PluralElementsPackedCow<'data, V>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PluralElementsPackedCow<'data, V>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T, V> From<PluralElements<T>> for PluralElementsPackedCow<'static, V>
impl<T, V> From<PluralElements<T>> for PluralElementsPackedCow<'static, V>
source§fn from(value: PluralElements<T>) -> PluralElementsPackedCow<'static, V>
fn from(value: PluralElements<T>) -> PluralElementsPackedCow<'static, V>
Converts to this type from the input type.
source§impl<'data, V> PartialEq for PluralElementsPackedCow<'data, V>
impl<'data, V> PartialEq for PluralElementsPackedCow<'data, V>
source§fn eq(&self, other: &PluralElementsPackedCow<'data, V>) -> bool
fn eq(&self, other: &PluralElementsPackedCow<'data, V>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.source§impl<'data, V> Serialize for PluralElementsPackedCow<'data, V>
impl<'data, V> Serialize for PluralElementsPackedCow<'data, V>
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,
Serialize this value into the given Serde serializer. Read more
source§impl<'a, V> Yokeable<'a> for PluralElementsPackedCow<'static, V>
impl<'a, V> Yokeable<'a> for PluralElementsPackedCow<'static, V>
source§type Output = PluralElementsPackedCow<'a, V>
type Output = PluralElementsPackedCow<'a, V>
This type MUST be
Self
with the 'static
replaced with 'a
, i.e. Self<'a>
source§fn transform(
&'a self,
) -> &'a <PluralElementsPackedCow<'static, V> as Yokeable<'a>>::Output
fn transform( &'a self, ) -> &'a <PluralElementsPackedCow<'static, V> as Yokeable<'a>>::Output
source§fn transform_owned(
self,
) -> <PluralElementsPackedCow<'static, V> as Yokeable<'a>>::Output
fn transform_owned( self, ) -> <PluralElementsPackedCow<'static, V> as Yokeable<'a>>::Output
source§unsafe fn make(
this: <PluralElementsPackedCow<'static, V> as Yokeable<'a>>::Output,
) -> PluralElementsPackedCow<'static, V>
unsafe fn make( this: <PluralElementsPackedCow<'static, V> as Yokeable<'a>>::Output, ) -> PluralElementsPackedCow<'static, V>
This method can be used to cast away
Self<'a>
’s lifetime. Read moresource§fn transform_mut<F>(&'a mut self, f: F)where
F: 'static + for<'b> FnOnce(&'b mut <PluralElementsPackedCow<'static, V> as Yokeable<'a>>::Output),
fn transform_mut<F>(&'a mut self, f: F)where
F: 'static + for<'b> FnOnce(&'b mut <PluralElementsPackedCow<'static, V> 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 moresource§impl<'zf, 'zf_inner, V> ZeroFrom<'zf, PluralElementsPackedCow<'zf_inner, V>> for PluralElementsPackedCow<'zf, V>where
V: VarULE + ?Sized,
Cow<'zf, PluralElementsPackedULE<V>>: ZeroFrom<'zf, Cow<'zf_inner, PluralElementsPackedULE<V>>>,
impl<'zf, 'zf_inner, V> ZeroFrom<'zf, PluralElementsPackedCow<'zf_inner, V>> for PluralElementsPackedCow<'zf, V>where
V: VarULE + ?Sized,
Cow<'zf, PluralElementsPackedULE<V>>: ZeroFrom<'zf, Cow<'zf_inner, PluralElementsPackedULE<V>>>,
source§fn zero_from(
this: &'zf PluralElementsPackedCow<'zf_inner, V>,
) -> PluralElementsPackedCow<'zf, V>
fn zero_from( this: &'zf PluralElementsPackedCow<'zf_inner, V>, ) -> PluralElementsPackedCow<'zf, V>
Clone the other
C
into a struct that may retain references into C
.impl<'data, V> StructuralPartialEq for PluralElementsPackedCow<'data, V>
Auto Trait Implementations§
impl<'data, V> Freeze for PluralElementsPackedCow<'data, V>where
V: ?Sized,
impl<'data, V> RefUnwindSafe for PluralElementsPackedCow<'data, V>where
V: RefUnwindSafe + ?Sized,
impl<'data, V> Send for PluralElementsPackedCow<'data, V>
impl<'data, V> Sync for PluralElementsPackedCow<'data, V>
impl<'data, V> Unpin for PluralElementsPackedCow<'data, V>where
V: ?Sized,
impl<'data, V> UnwindSafe for PluralElementsPackedCow<'data, V>
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
Mutably borrows from an owned value. Read more
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)
🔬This is a nightly-only experimental API. (
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>
Converts
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>
Converts
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