#[repr(u8)]
pub enum Week {
WeekOfYear,
WeekOfMonth,
}
Expand description
An enum for the possible symbols of a week field in a date pattern.
Variants
WeekOfYear
Field symbol for week of year (numeric).
When used in a pattern with year, use Year::WeekOf
for the year field instead of Year::Calendar
.
This field symbol is represented by the character w
in a date formatting pattern string.
For more details, see documentation on date field symbols.
WeekOfMonth
Field symbol for week of month (numeric).
This field symbol is represented by the character W
in a date formatting pattern string.
For more details, see documentation on date field symbols.
Trait Implementations
sourceimpl Bake for Week
impl Bake for Week
sourcefn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
Returns a TokenStream
that would evaluate to self
. Read more
sourceimpl<'de> Deserialize<'de> for Week
impl<'de> Deserialize<'de> for Week
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<Week, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Week, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<Week> for FieldSymbol
impl From<Week> for FieldSymbol
sourcefn from(input: Week) -> FieldSymbol
fn from(input: Week) -> FieldSymbol
Converts to this type from the input type.
sourceimpl Ord for Week
impl Ord for Week
sourceimpl PartialOrd<Week> for Week
impl PartialOrd<Week> for Week
sourcefn partial_cmp(&self, other: &Week) -> Option<Ordering>
fn partial_cmp(&self, other: &Week) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Serialize for Week
impl Serialize for Week
sourcefn 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
sourceimpl<'a> Yokeable<'a> for Week
impl<'a> Yokeable<'a> for Week
sourcefn transform(&self) -> &<Week as Yokeable<'a>>::Output
fn transform(&self) -> &<Week as Yokeable<'a>>::Output
This method must cast self
between &'a Self<'static>
and &'a Self<'a>
. Read more
sourcefn transform_owned(self) -> <Week as Yokeable<'a>>::Output
fn transform_owned(self) -> <Week as Yokeable<'a>>::Output
This method must cast self
between Self<'static>
and Self<'a>
. Read more
sourceimpl<'a> ZeroMapKV<'a> for Week
impl<'a> ZeroMapKV<'a> for Week
impl Copy for Week
impl Eq for Week
impl<'a> IsCovariant<'a> for Week
impl StructuralEq for Week
impl StructuralPartialEq for Week
Auto Trait Implementations
impl RefUnwindSafe for Week
impl Send for Week
impl Sync for Week
impl Unpin for Week
impl UnwindSafe for Week
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Serialize for T where
T: Serialize + ?Sized,
impl<T> Serialize for T where
T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more