(key: &str)
| 1102 | } |
| 1103 | |
| 1104 | pub(super) fn is_valid_env_key(key: &str) -> bool { |
| 1105 | let mut bytes = key.bytes(); |
| 1106 | let Some(first) = bytes.next() else { |
| 1107 | return false; |
| 1108 | }; |
| 1109 | if !(first == b'_' || first.is_ascii_alphabetic()) { |
| 1110 | return false; |
| 1111 | } |
| 1112 | bytes.all(|byte| byte == b'_' || byte.is_ascii_alphanumeric()) |
| 1113 | } |
| 1114 | |
| 1115 | // --------------------------------------------------------------------------- |
| 1116 | // Trait impls for persistence |
no test coverage detected