//! API key loading (from parameter or environment variable).
use AiMuxError;
/// Load an API key from the given value or environment variable.
///
/// If `api_key` is `Some`, returns it directly.
/// Otherwise reads from `environment_variable_name`.
///
/// # Errors
///
/// Returns `AiMuxError::InvalidArgument` when neither the `api_key` value nor
/// the environment variable yields a key.