PreviousTimeIndex

Trait PreviousTimeIndex 

Source
pub trait PreviousTimeIndex: TimeIndexable {
    // Provided methods
    fn get_previous_year_index(&self) -> Option<&usize> { ... }
    fn get_previous_month_index(&self) -> Option<&usize> { ... }
    fn get_previous_week_index(&self) -> Option<&usize> { ... }
    fn get_previous_day_index(&self) -> Option<&usize> { ... }
    fn get_previous_hour_index(&self) -> Option<&usize> { ... }
    fn get_previous_minute_index(&self) -> Option<&usize> { ... }
    fn set_previous_year_index(&mut self, index: usize) { ... }
    fn set_previous_month_index(&mut self, index: usize) { ... }
    fn set_previous_week_index(&mut self, index: usize) { ... }
    fn set_previous_day_index(&mut self, index: usize) { ... }
    fn set_previous_hour_index(&mut self, index: usize) { ... }
    fn set_previous_minute_index(&mut self, index: usize) { ... }
}
Expand description

Trait for getting and setting the previous time index for various time scales.

This trait extends TimeIndexable and provides a convenient interface for interacting with the “previous” time indices, as opposed to the “current” ones.

Provided Methods§

Source

fn get_previous_year_index(&self) -> Option<&usize>

Returns the previous year index, if it exists.

§Returns

An Option containing a reference to the index, or None if not set.

Source

fn get_previous_month_index(&self) -> Option<&usize>

Returns the previous month index, if it exists.

§Returns

An Option containing a reference to the index, or None if not set.

Source

fn get_previous_week_index(&self) -> Option<&usize>

Returns the previous week index, if it exists.

§Returns

An Option containing a reference to the index, or None if not set.

Source

fn get_previous_day_index(&self) -> Option<&usize>

Returns the previous day index, if it exists.

§Returns

An Option containing a reference to the index, or None if not set.

Source

fn get_previous_hour_index(&self) -> Option<&usize>

Returns the previous hour index, if it exists.

§Returns

An Option containing a reference to the index, or None if not set.

Source

fn get_previous_minute_index(&self) -> Option<&usize>

Returns the previous minute index, if it exists.

§Returns

An Option containing a reference to the index, or None if not set.

Source

fn set_previous_year_index(&mut self, index: usize)

Sets the previous year index.

§Arguments
  • index - The index to set for the previous year.
Source

fn set_previous_month_index(&mut self, index: usize)

Sets the previous month index.

§Arguments
  • index - The index to set for the previous month.
Source

fn set_previous_week_index(&mut self, index: usize)

Sets the previous week index.

§Arguments
  • index - The index to set for the previous week.
Source

fn set_previous_day_index(&mut self, index: usize)

Sets the previous day index.

§Arguments
  • index - The index to set for the previous day.
Source

fn set_previous_hour_index(&mut self, index: usize)

Sets the previous hour index.

§Arguments
  • index - The index to set for the previous hour.
Source

fn set_previous_minute_index(&mut self, index: usize)

Sets the previous minute index.

§Arguments
  • index - The index to set for the previous minute.

Implementors§

Source§

impl<D, S, T, ST, SYM, VS, VT> PreviousTimeIndex for Context<D, S, T, ST, SYM, VS, VT>
where D: Datable + Clone, S: Spatial<VS> + Clone, T: Temporal<VT> + Clone, ST: SpaceTemporal<VS, VT> + Clone, SYM: Symbolic + Clone, VS: Clone, VT: Clone,