pub struct DatePatternFlags {
pub year: bool,
pub month: bool,
pub day: bool,
pub week_day: bool,
}Expand description
Flags describing the components in a DatePattern.
This data structure is used, for example, by DatePattern::validate.
Fields§
§year: bool§month: bool§day: bool§week_day: boolTrait Implementations§
Source§impl Clone for DatePatternFlags
impl Clone for DatePatternFlags
Source§fn clone(&self) -> DatePatternFlags
fn clone(&self) -> DatePatternFlags
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DatePatternFlags
impl Debug for DatePatternFlags
Source§impl Display for DatePatternFlags
DatePatternFlags can be converted to a String
consisting of cumulated single characters - one for each
enabled date component:
impl Display for DatePatternFlags
DatePatternFlags can be converted to a String consisting of cumulated single characters - one for each enabled date component:
use chinese_format::{*, gregorian::*};
assert_eq!(
DatePatternFlags {
year: false,
month: false,
day: false,
week_day: false
}.to_string(),
""
);
assert_eq!(
DatePatternFlags {
year: true,
month: true,
day: true,
week_day: true
}.to_string(),
"ymdw"
);
Source§impl Hash for DatePatternFlags
impl Hash for DatePatternFlags
Source§impl Ord for DatePatternFlags
impl Ord for DatePatternFlags
Source§impl PartialEq for DatePatternFlags
impl PartialEq for DatePatternFlags
Source§impl PartialOrd for DatePatternFlags
impl PartialOrd for DatePatternFlags
impl Copy for DatePatternFlags
impl Eq for DatePatternFlags
impl StructuralPartialEq for DatePatternFlags
Auto Trait Implementations§
impl Freeze for DatePatternFlags
impl RefUnwindSafe for DatePatternFlags
impl Send for DatePatternFlags
impl Sync for DatePatternFlags
impl Unpin for DatePatternFlags
impl UnwindSafe for DatePatternFlags
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)