/// Given an API key, it returns max_version. None if not found
Given an API key, it returns max_version. None if not found
Given an API key it returns max_version . None if not found
pub fn lookup_version(&self, api_key: u16) -> Option<i16> {
        for version in &self.versions {
            if version.api_key == api_key as i16 {
                return Some(version.max_version);
            }
        }
        None
    }
pub fn lookup_version ( & self , api_key : u16 ) -> Option < i16 > { for version in & self . versions { if version . api_key == api_key as i16 { return Some ( version . max_version ) ; } } None }
Given an API key, it returns max_version.
Given an API key it returns max_version .
&self
api_key
u16