/// Checks if the given IntlInfo is valid.
Checks if the given IntlInfo is valid.
Checks if the given IntlInfo is valid .
fn validate_intl_info(&self, info: IntlInfo) -> Result<(), SwitchboardError> {
        if let Some(time_zone_id) = info.time_zone_id {
            // Make sure the given time zone ID is valid.
            if !self.time_zone_ids.contains(time_zone_id.as_str()) {
                return Err(SwitchboardError::InvalidArgument {
                    setting_type: SettingType::Intl,
                    argument: "timezone id".to_string(),
                    value: time_zone_id.as_str().to_string(),
                });
            }
        }
        Ok(())
    }
fn validate_intl_info ( & self , info : IntlInfo ) -> Result < ( ) , SwitchboardError > { if let Some ( time_zone_id ) = info . time_zone_id { // Make sure the given time zone ID is valid. if ! self . time_zone_ids . contains ( time_zone_id . as_str ( ) ) { return Err ( SwitchboardError :: InvalidArgument { setting_type : SettingType :: Intl , argument : " " . to_string ( ) , value : time_zone_id . as_str ( ) . to_string ( ) , } ) ; } } Ok ( ( ) ) }
Checks if the given IntlInfo is valid.
Checks if the given IntlInfo is valid .
&self
info
IntlInfo