pub enum PatternItem {
Field(Field),
Literal(char),
}
Expand description
An element of a Pattern
.
🚧 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.
Variants§
Field(Field)
A field, like “abbreviated months”. Mostly follows UTS 35.
Literal(char)
A literal code point.
Trait Implementations§
source§impl AsULE for PatternItem
impl AsULE for PatternItem
source§fn to_unaligned(self) -> <PatternItem as AsULE>::ULE
fn to_unaligned(self) -> <PatternItem as AsULE>::ULE
source§fn from_unaligned(unaligned: <PatternItem as AsULE>::ULE) -> PatternItem
fn from_unaligned(unaligned: <PatternItem as AsULE>::ULE) -> PatternItem
source§impl Bake for PatternItem
impl Bake for PatternItem
source§fn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
source§impl BakeSize for PatternItem
impl BakeSize for PatternItem
source§fn borrows_size(&self) -> usize
fn borrows_size(&self) -> usize
Returns the size
source§impl Clone for PatternItem
impl Clone for PatternItem
source§fn clone(&self) -> PatternItem
fn clone(&self) -> PatternItem
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 PatternItem
impl Debug for PatternItem
source§impl<'de> Deserialize<'de> for PatternItem
impl<'de> Deserialize<'de> for PatternItem
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PatternItem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PatternItem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<(FieldSymbol, FieldLength)> for PatternItem
impl From<(FieldSymbol, FieldLength)> for PatternItem
source§fn from(input: (FieldSymbol, FieldLength)) -> PatternItem
fn from(input: (FieldSymbol, FieldLength)) -> PatternItem
Converts to this type from the input type.
source§impl From<PatternItem> for TimeGranularity
impl From<PatternItem> for TimeGranularity
source§fn from(item: PatternItem) -> TimeGranularity
fn from(item: PatternItem) -> TimeGranularity
Retrieves the granularity of time represented by a PatternItem
.
If the PatternItem
is not time-related, returns None
.
source§impl From<char> for PatternItem
impl From<char> for PatternItem
source§fn from(input: char) -> PatternItem
fn from(input: char) -> PatternItem
Converts to this type from the input type.
source§impl FromIterator<PatternItem> for Pattern<'_>
impl FromIterator<PatternItem> for Pattern<'_>
source§fn from_iter<T>(iter: T) -> Pattern<'_>where
T: IntoIterator<Item = PatternItem>,
fn from_iter<T>(iter: T) -> Pattern<'_>where
T: IntoIterator<Item = PatternItem>,
Creates a value from an iterator. Read more
source§impl PartialEq for PatternItem
impl PartialEq for PatternItem
source§impl Serialize for PatternItem
impl Serialize for PatternItem
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
impl Copy for PatternItem
impl Eq for PatternItem
impl StructuralPartialEq for PatternItem
Auto Trait Implementations§
impl Freeze for PatternItem
impl RefUnwindSafe for PatternItem
impl Send for PatternItem
impl Sync for PatternItem
impl Unpin for PatternItem
impl UnwindSafe for PatternItem
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