Struct MonthIter
pub struct MonthIter { /* private fields */ }
An infinite iterator over Months.
This struct is created by Month::iter_from or MonthIter::new.
Implementations
impl MonthIter
const fn new(start: Month) -> SelfCreate a new
MonthIterstarting atstart.# use time::{Month, iter::MonthIter}; let mut iter = MonthIter::new(Month::January); assert_eq!(iter.next(), Some(Month::January)); assert_eq!(iter.next(), Some(Month::February)); assert_eq!(iter.next(), Some(Month::March));const fn rev(self) -> Rev<Self>Make the iterator go in reverse order.
# use time::{Month, iter::MonthIter}; let mut iter = MonthIter::new(Month::January).rev(); assert_eq!(iter.next(), Some(Month::January)); assert_eq!(iter.next(), Some(Month::December)); assert_eq!(iter.next(), Some(Month::November));
Trait Implementations
impl Clone for MonthIter
fn clone(&self) -> Self
impl Debug for MonthIter
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for MonthIter
impl FusedIterator for MonthIter
impl Iterator for MonthIter
type Item = Month;fn next(&mut self) -> Option<Self::Item>fn size_hint(&self) -> (usize, Option<usize>)fn nth(&mut self, n: usize) -> Option<Self::Item>fn count(self) -> usizefn last(self) -> Option<Self::Item>fn all<F>(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool,fn any<F>(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool,fn max(self) -> Option<Self::Item>fn min(self) -> Option<Self::Item>fn is_sorted(self) -> bool
impl PartialEq for MonthIter
fn eq(&self, other: &Self) -> bool