pub fn to_specific_yearly(&self, year: i32) -> Result<YearlyItem, String> {
        match self.to_yearly().0.iter().find(|e| e.year == year) {
            Some(value) => Ok((*value).clone()),
            None => Err("Year not found".into()),
        }
    }
/// Aggregate daily into yearly format and pick 1 specific year.
///
/// #### Output
/// ```json
/// {
///     "year": 2020,
///     "positive": 743198,
///     "recovered": 611097,
///     "deaths": 22138,
///     "active": 109963
/// }
/// ```
Aggregate daily into yearly format and pick 1 specific year.
Aggregate daily into yearly format and pick 1 specific year .
pub fn to_specific_yearly(&self, year: i32) -> Result<YearlyItem, String> {
        match self.to_yearly().0.iter().find(|e| e.year == year) {
            Some(value) => Ok((*value).clone()),
            None => Err("Year not found".into()),
        }
    }
pub fn to_specific_yearly ( & self , year : i32 ) -> Result < YearlyItem , String > { match self . to_yearly ( ) . 0 . iter ( ) . find ( | e | e . year == year ) { Some ( value ) => Ok ( ( * value ) . clone ( ) ) , None => Err ( " " . into ( ) ) , } }
Aggregate daily into yearly format and pick 1 specific year.
Aggregate daily into yearly format and pick 1 specific year .
&self
year
i32
output
None