pub enum DoublePlaceholderKey {
    Place0,
    Place1,
}Expand description
A two-value enum for the DoublePlaceholder pattern backend.
§Examples
use core::cmp::Ordering;
use core::str::FromStr;
use icu_pattern::DoublePlaceholderKey;
use icu_pattern::DoublePlaceholderPattern;
use icu_pattern::PatternItem;
// Parse the string syntax
let pattern = DoublePlaceholderPattern::try_from_str(
    "Hello, {0} and {1}!",
    Default::default(),
)
.unwrap();
assert_eq!(
    pattern.iter().cmp(
        [
            PatternItem::Literal("Hello, "),
            PatternItem::Placeholder(DoublePlaceholderKey::Place0),
            PatternItem::Literal(" and "),
            PatternItem::Placeholder(DoublePlaceholderKey::Place1),
            PatternItem::Literal("!")
        ]
        .into_iter()
    ),
    Ordering::Equal
);Variants§
Trait Implementations§
Source§impl Clone for DoublePlaceholderKey
 
impl Clone for DoublePlaceholderKey
Source§fn clone(&self) -> DoublePlaceholderKey
 
fn clone(&self) -> DoublePlaceholderKey
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 Debug for DoublePlaceholderKey
 
impl Debug for DoublePlaceholderKey
Source§impl<'de> Deserialize<'de> for DoublePlaceholderKey
 
impl<'de> Deserialize<'de> for DoublePlaceholderKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromStr for DoublePlaceholderKey
 
impl FromStr for DoublePlaceholderKey
Source§impl Ord for DoublePlaceholderKey
 
impl Ord for DoublePlaceholderKey
Source§fn cmp(&self, other: &DoublePlaceholderKey) -> Ordering
 
fn cmp(&self, other: &DoublePlaceholderKey) -> 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 PartialEq for DoublePlaceholderKey
 
impl PartialEq for DoublePlaceholderKey
Source§impl PartialOrd for DoublePlaceholderKey
 
impl PartialOrd for DoublePlaceholderKey
Source§impl<W> PlaceholderValueProvider<DoublePlaceholderKey> for [W; 2]where
    W: Writeable,
 
impl<W> PlaceholderValueProvider<DoublePlaceholderKey> for [W; 2]where
    W: Writeable,
type Error = Infallible
Source§type W<'a> = WriteableAsTryWriteableInfallible<&'a W>
where
    Self: 'a
 
type W<'a> = WriteableAsTryWriteableInfallible<&'a W> where Self: 'a
Source§fn value_for(&self, key: DoublePlaceholderKey) -> Self::W<'_>
 
fn value_for(&self, key: DoublePlaceholderKey) -> Self::W<'_>
Returns the 
TryWriteable to substitute for the given placeholder. Read moreSource§impl<W0, W1> PlaceholderValueProvider<DoublePlaceholderKey> for (W0, W1)
 
impl<W0, W1> PlaceholderValueProvider<DoublePlaceholderKey> for (W0, W1)
type Error = Infallible
Source§fn value_for(&self, key: DoublePlaceholderKey) -> Self::W<'_>
 
fn value_for(&self, key: DoublePlaceholderKey) -> Self::W<'_>
Returns the 
TryWriteable to substitute for the given placeholder. Read moreSource§impl Serialize for DoublePlaceholderKey
 
impl Serialize for DoublePlaceholderKey
impl Copy for DoublePlaceholderKey
impl Eq for DoublePlaceholderKey
impl StructuralPartialEq for DoublePlaceholderKey
Auto Trait Implementations§
impl Freeze for DoublePlaceholderKey
impl RefUnwindSafe for DoublePlaceholderKey
impl Send for DoublePlaceholderKey
impl Sync for DoublePlaceholderKey
impl Unpin for DoublePlaceholderKey
impl UnwindSafe for DoublePlaceholderKey
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