Function encode
Source pub fn encode(location: Location) -> Result<String, DigipinError>
Expand description
Encodes coordinates into a canonical DIGIPIN.
§Arguments
location: A struct containing the latitude and longitude to encode.
§Returns
Ok(String): A string representing the encoded DIGIPIN.
Err(DigipinError): An error if the coordinates are invalid or outside the supported territory.