Struct icu::locale::provider::StrStrPair
source ยท pub struct StrStrPair<'a>(pub Cow<'a, str>, pub Cow<'a, str>);
Expand description
A pair of strings with a EncodeAsVarULE implementation.
๐ง This code is considered unstable; it may change at any time, in breaking or non-breaking ways,
including in SemVer minor releases. While the serde representation of data structs is guaranteed
to be stable, their Rust representation might not be. Use with caution.
Tuple Fieldsยง
ยง0: Cow<'a, str>
ยง1: Cow<'a, str>
Trait Implementationsยง
sourceยงimpl<'a> Bake for StrStrPair<'a>
impl<'a> Bake for StrStrPair<'a>
sourceยงfn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
sourceยงimpl<'a> BakeSize for StrStrPair<'a>
impl<'a> BakeSize for StrStrPair<'a>
sourceยงfn borrows_size(&self) -> usize
fn borrows_size(&self) -> usize
Returns the size
sourceยงimpl<'a> Clone for StrStrPair<'a>
impl<'a> Clone for StrStrPair<'a>
sourceยงfn clone(&self) -> StrStrPair<'a>
fn clone(&self) -> StrStrPair<'a>
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<'a> Debug for StrStrPair<'a>
impl<'a> Debug for StrStrPair<'a>
sourceยงimpl<'de, 'a> Deserialize<'de> for StrStrPair<'a>where
'de: 'a,
impl<'de, 'a> Deserialize<'de> for StrStrPair<'a>where
'de: 'a,
sourceยงfn deserialize<__D>(
__deserializer: __D,
) -> Result<StrStrPair<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StrStrPair<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceยงimpl<'a> EncodeAsVarULE<StrStrPairVarULE> for &StrStrPair<'a>
impl<'a> EncodeAsVarULE<StrStrPairVarULE> for &StrStrPair<'a>
sourceยงfn encode_var_ule_as_slices<R>(&self, cb: impl FnOnce(&[&[u8]]) -> R) -> R
fn encode_var_ule_as_slices<R>(&self, cb: impl FnOnce(&[&[u8]]) -> R) -> R
Calls
cb
with a piecewise list of byte slices that when concatenated
produce the memory pattern of the corresponding instance of T
. Read moresourceยงfn encode_var_ule_len(&self) -> usize
fn encode_var_ule_len(&self) -> usize
Return the length, in bytes, of the corresponding
VarULE
typesourceยงfn encode_var_ule_write(&self, dst: &mut [u8])
fn encode_var_ule_write(&self, dst: &mut [u8])
Write the corresponding
VarULE
type to the dst
buffer. dst
should
be the size of Self::encode_var_ule_len()
sourceยงimpl<'a> EncodeAsVarULE<StrStrPairVarULE> for StrStrPair<'a>
impl<'a> EncodeAsVarULE<StrStrPairVarULE> for StrStrPair<'a>
sourceยงfn encode_var_ule_as_slices<R>(&self, cb: impl FnOnce(&[&[u8]]) -> R) -> R
fn encode_var_ule_as_slices<R>(&self, cb: impl FnOnce(&[&[u8]]) -> R) -> R
Calls
cb
with a piecewise list of byte slices that when concatenated
produce the memory pattern of the corresponding instance of T
. Read moresourceยงfn encode_var_ule_len(&self) -> usize
fn encode_var_ule_len(&self) -> usize
Return the length, in bytes, of the corresponding
VarULE
typesourceยงfn encode_var_ule_write(&self, dst: &mut [u8])
fn encode_var_ule_write(&self, dst: &mut [u8])
Write the corresponding
VarULE
type to the dst
buffer. dst
should
be the size of Self::encode_var_ule_len()
sourceยงimpl<'a> From<&'a StrStrPairVarULE> for StrStrPair<'a>
impl<'a> From<&'a StrStrPairVarULE> for StrStrPair<'a>
sourceยงfn from(other: &'a StrStrPairVarULE) -> StrStrPair<'a>
fn from(other: &'a StrStrPairVarULE) -> StrStrPair<'a>
Converts to this type from the input type.
sourceยงimpl<'a> Ord for StrStrPair<'a>
impl<'a> Ord for StrStrPair<'a>
sourceยงfn cmp(&self, other: &StrStrPair<'a>) -> Ordering
fn cmp(&self, other: &StrStrPair<'a>) -> Ordering
1.21.0 ยท sourceยงfn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
sourceยงimpl<'a> PartialEq for StrStrPair<'a>
impl<'a> PartialEq for StrStrPair<'a>
sourceยงimpl<'a> PartialOrd for StrStrPair<'a>
impl<'a> PartialOrd for StrStrPair<'a>
sourceยงimpl<'a> Serialize for StrStrPair<'a>
impl<'a> Serialize for StrStrPair<'a>
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> ZeroFrom<'a, StrStrPairVarULE> for StrStrPair<'a>
impl<'a> ZeroFrom<'a, StrStrPairVarULE> for StrStrPair<'a>
sourceยงfn zero_from(other: &'a StrStrPairVarULE) -> StrStrPair<'a>
fn zero_from(other: &'a StrStrPairVarULE) -> StrStrPair<'a>
Clone the other
C
into a struct that may retain references into C
.impl<'a> Eq for StrStrPair<'a>
impl<'a> StructuralPartialEq for StrStrPair<'a>
Auto Trait Implementationsยง
impl<'a> Freeze for StrStrPair<'a>
impl<'a> RefUnwindSafe for StrStrPair<'a>
impl<'a> Send for StrStrPair<'a>
impl<'a> Sync for StrStrPair<'a>
impl<'a> Unpin for StrStrPair<'a>
impl<'a> UnwindSafe for StrStrPair<'a>
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