khive-storage 0.11.0

Storage capability contracts and backend-neutral request context.
Documentation
1
2
3
4
5
6
7
8
9
10
//! Shared parsing for numeric environment settings.

/// Read a trimmed environment value as a number.
///
/// Missing, non-Unicode, empty and unparseable values return `None`. The
/// caller chooses the numeric type and retains its own range checks and
/// default; this helper neither logs nor supplies a fallback.
pub fn read_env_number<T: std::str::FromStr>(name: &str) -> Option<T> {
    std::env::var(name).ok()?.trim().parse().ok()
}