• Home
  • Raw
  • Download

Lines Matching refs:mdf

287     pub fn from_mdf(Mdf(mdf): Mdf) -> Of {  in from_mdf()
288 let mdl = mdf >> 3; in from_mdf()
290 Some(&v) => Of(mdf.wrapping_sub((i32::from(v) as u32 & 0x3ff) << 3)), in from_mdf()
417 let Mdf(mdf) = *self; in valid()
418 let mdl = mdf >> 3; in valid()
427 let Mdf(mdf) = *self; in month()
428 mdf >> 9 in month()
434 let Mdf(mdf) = *self; in with_month()
435 Mdf((mdf & 0b1_1111_1111) | (month << 9)) in with_month()
440 let Mdf(mdf) = *self; in day()
441 (mdf >> 4) & 0b1_1111 in day()
447 let Mdf(mdf) = *self; in with_day()
448 Mdf((mdf & !0b1_1111_0000) | (day << 4)) in with_day()
453 let Mdf(mdf) = *self; in flags()
454 YearFlags((mdf & 0b1111) as u8) in flags()
459 let Mdf(mdf) = *self; in with_flags()
460 Mdf((mdf & !0b1111) | u32::from(flags)) in with_flags()
471 let Mdf(mdf) = *self; in fmt()
475 mdf >> 9, in fmt()
476 (mdf >> 4) & 0b1_1111, in fmt()
477 mdf & 0b1111, in fmt()
478 YearFlags((mdf & 0b1111) as u8) in fmt()
569 let mdf = Mdf::new(month, day, flags); in test_mdf_valid() localVariable
571 mdf.valid() == expected, in test_mdf_valid()
575 mdf, in test_mdf_valid()
719 let mdf = Mdf::new(month, day, flags); in test_mdf_fields() localVariable
720 if mdf.valid() { in test_mdf_fields()
721 assert_eq!(mdf.month(), month); in test_mdf_fields()
722 assert_eq!(mdf.day(), day); in test_mdf_fields()
732 let mdf = Mdf::new(month, day, flags); in test_mdf_with_fields() localVariable
735 let mdf = mdf.with_month(month); in test_mdf_with_fields() localVariable
736 assert_eq!(mdf.valid(), Mdf::new(month, day, flags).valid()); in test_mdf_with_fields()
737 if mdf.valid() { in test_mdf_with_fields()
738 assert_eq!(mdf.month(), month); in test_mdf_with_fields()
739 assert_eq!(mdf.day(), day); in test_mdf_with_fields()
744 let mdf = mdf.with_day(day); in test_mdf_with_fields() localVariable
745 assert_eq!(mdf.valid(), Mdf::new(month, day, flags).valid()); in test_mdf_with_fields()
746 if mdf.valid() { in test_mdf_with_fields()
747 assert_eq!(mdf.month(), month); in test_mdf_with_fields()
748 assert_eq!(mdf.day(), day); in test_mdf_with_fields()
791 let mdf = Mdf(i); in test_mdf_to_of() localVariable
792 assert_eq!(mdf.valid(), mdf.to_of().valid()); in test_mdf_to_of()
809 let mdf = Mdf(i); in test_mdf_to_of_to_mdf() localVariable
810 if mdf.valid() { in test_mdf_to_of_to_mdf()
811 assert_eq!(mdf, mdf.to_of().to_mdf()); in test_mdf_to_of_to_mdf()