pub enum SinglePlaceholderKey {
    Singleton,
}Expand description
A singleton enum for the SinglePlaceholder pattern backend.
§Examples
use core::cmp::Ordering;
use core::str::FromStr;
use icu_pattern::PatternItem;
use icu_pattern::SinglePlaceholder;
use icu_pattern::SinglePlaceholderKey;
use icu_pattern::SinglePlaceholderPattern;
// Parse the string syntax and check the resulting data store:
let pattern = SinglePlaceholderPattern::try_from_str(
    "Hello, {0}!",
    Default::default(),
)
.unwrap();
assert_eq!(
    pattern.iter().cmp(
        [
            PatternItem::Literal("Hello, "),
            PatternItem::Placeholder(SinglePlaceholderKey::Singleton),
            PatternItem::Literal("!")
        ]
        .into_iter()
    ),
    Ordering::Equal
);Variants§
Singleton
Trait Implementations§
Source§impl Clone for SinglePlaceholderKey
 
impl Clone for SinglePlaceholderKey
Source§fn clone(&self) -> SinglePlaceholderKey
 
fn clone(&self) -> SinglePlaceholderKey
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 SinglePlaceholderKey
 
impl Debug for SinglePlaceholderKey
Source§impl<'de> Deserialize<'de> for SinglePlaceholderKey
 
impl<'de> Deserialize<'de> for SinglePlaceholderKey
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 SinglePlaceholderKey
 
impl FromStr for SinglePlaceholderKey
Source§impl Ord for SinglePlaceholderKey
 
impl Ord for SinglePlaceholderKey
Source§fn cmp(&self, other: &SinglePlaceholderKey) -> Ordering
 
fn cmp(&self, other: &SinglePlaceholderKey) -> 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 SinglePlaceholderKey
 
impl PartialEq for SinglePlaceholderKey
Source§impl PartialOrd for SinglePlaceholderKey
 
impl PartialOrd for SinglePlaceholderKey
Source§impl<W> PlaceholderValueProvider<SinglePlaceholderKey> for [W; 1]where
    W: Writeable,
 
impl<W> PlaceholderValueProvider<SinglePlaceholderKey> for [W; 1]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: SinglePlaceholderKey) -> Self::W<'_>
 
fn value_for(&self, _key: SinglePlaceholderKey) -> Self::W<'_>
Returns the 
TryWriteable to substitute for the given placeholder. Read moreSource§impl<W> PlaceholderValueProvider<SinglePlaceholderKey> for (W,)where
    W: Writeable,
 
impl<W> PlaceholderValueProvider<SinglePlaceholderKey> for (W,)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: SinglePlaceholderKey) -> Self::W<'_>
 
fn value_for(&self, _key: SinglePlaceholderKey) -> Self::W<'_>
Returns the 
TryWriteable to substitute for the given placeholder. Read moreSource§impl Serialize for SinglePlaceholderKey
 
impl Serialize for SinglePlaceholderKey
impl Copy for SinglePlaceholderKey
impl Eq for SinglePlaceholderKey
impl StructuralPartialEq for SinglePlaceholderKey
Auto Trait Implementations§
impl Freeze for SinglePlaceholderKey
impl RefUnwindSafe for SinglePlaceholderKey
impl Send for SinglePlaceholderKey
impl Sync for SinglePlaceholderKey
impl Unpin for SinglePlaceholderKey
impl UnwindSafe for SinglePlaceholderKey
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