Skip to main content

resolve_api_key

Function resolve_api_key 

Source
pub fn resolve_api_key(api_key: Option<SecretString>) -> Result<SecretString>
Expand description

Resolves the API key from api_key, or from COINAPI_API_KEY when it is None.

ยงErrors

Returns an error if neither source provides a key, or the key is not non-empty visible ASCII.