Lines Matching refs:Mdf

287     pub fn from_mdf(Mdf(mdf): Mdf) -> Of {  in from_mdf()
342 pub fn to_mdf(&self) -> Mdf { in to_mdf() argument
343 Mdf::from_of(*self) in to_mdf()
378 pub struct Mdf(pub u32); struct
380 impl Mdf { impl
400 pub fn new(month: u32, day: u32, YearFlags(flags): YearFlags) -> Mdf { in new() argument
401 let month = Mdf::clamp_month(month); in new()
402 let day = Mdf::clamp_day(day); in new()
403 Mdf((month << 9) | (day << 4) | u32::from(flags)) in new()
407 pub fn from_of(Of(of): Of) -> Mdf { in from_of() argument
410 Some(&v) => Mdf(of + (u32::from(v) << 3)), in from_of()
411 None => Mdf(0), in from_of()
417 let Mdf(mdf) = *self; in valid() localVariable
427 let Mdf(mdf) = *self; in month() localVariable
432 pub fn with_month(&self, month: u32) -> Mdf { in with_month() argument
433 let month = Mdf::clamp_month(month); in with_month()
434 let Mdf(mdf) = *self; in with_month() localVariable
435 Mdf((mdf & 0b1_1111_1111) | (month << 9)) in with_month()
440 let Mdf(mdf) = *self; in day() localVariable
445 pub fn with_day(&self, day: u32) -> Mdf { in with_day() argument
446 let day = Mdf::clamp_day(day); in with_day()
447 let Mdf(mdf) = *self; in with_day() localVariable
448 Mdf((mdf & !0b1_1111_0000) | (day << 4)) in with_day()
453 let Mdf(mdf) = *self; in flags() localVariable
458 pub fn with_flags(&self, YearFlags(flags): YearFlags) -> Mdf { in with_flags() argument
459 let Mdf(mdf) = *self; in with_flags() localVariable
460 Mdf((mdf & !0b1111) | u32::from(flags)) in with_flags()
469 impl fmt::Debug for Mdf { implementation
471 let Mdf(mdf) = *self; in fmt() localVariable
489 use super::{Mdf, Of};
569 let mdf = Mdf::new(month, day, flags); in test_mdf_valid()
719 let mdf = Mdf::new(month, day, flags); in test_mdf_fields()
732 let mdf = Mdf::new(month, day, flags); in test_mdf_with_fields()
736 assert_eq!(mdf.valid(), Mdf::new(month, day, flags).valid()); in test_mdf_with_fields()
745 assert_eq!(mdf.valid(), Mdf::new(month, day, flags).valid()); in test_mdf_with_fields()
791 let mdf = Mdf(i); in test_mdf_to_of()
809 let mdf = Mdf(i); in test_mdf_to_of_to_mdf()