pub struct Skeleton(/* private fields */);
Expand description
A Skeleton
is used to represent what types of Field
s are present in a Pattern
. The
ordering of the Skeleton
’s Field
s have no bearing on the ordering of the Field
s and
Literal
s in the Pattern
.
A Skeleton
is a Vec
<Field>
, but with the invariant that it is sorted according to the canonical
sort order. This order is sorted according to the most significant Field
to the least significant.
For example, a field with a Minute
symbol would precede a field with a Second
symbol.
This order is documented as the order of fields as presented in the
UTS 35 Date Field Symbol Table
The Field
s are only sorted in the Skeleton
in order to provide a deterministic
serialization strategy, and to provide a faster Skeleton
matching operation.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Skeleton
impl<'de> Deserialize<'de> for Skeleton
source§fn deserialize<D>(
deserializer: D,
) -> Result<Skeleton, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Skeleton, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
source§impl Ord for Skeleton
impl Ord for Skeleton
source§impl PartialOrd for Skeleton
impl PartialOrd for Skeleton
source§impl Serialize for Skeleton
impl Serialize for Skeleton
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,
source§impl TryFrom<&str> for Skeleton
impl TryFrom<&str> for Skeleton
Parse a string into a list of fields. This trait implementation validates the input string to
verify that fields are correct. If the fields are out of order, this returns an error that
contains the fields, which gives the callee a chance to sort the fields with the
From<SmallVec<[fields::Field; 5]>> for Skeleton
trait.
impl Eq for Skeleton
impl StructuralPartialEq for Skeleton
Auto Trait Implementations§
impl Freeze for Skeleton
impl RefUnwindSafe for Skeleton
impl Send for Skeleton
impl Sync for Skeleton
impl Unpin for Skeleton
impl UnwindSafe for Skeleton
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
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)
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>
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>
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