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 
VarULEso it can’t be used in aVarZeroSlice - It always serializes the 
FourBitMetadataas 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<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<'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§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