@@ -20,13 +20,16 @@ pub struct Environment {
2020 /// Optional prefix that will limit access to the environment to only keys that
2121 /// begin with the defined prefix.
2222 ///
23- /// A prefix with a separator of `_` is tested to be present on each key before its considered
24- /// to be part of the source environment.
23+ /// The prefix is tested to be present on each key before it's considered to be part of the
24+ /// source environment. The separator character can be set through
25+ /// [`prefix_separator`](Environment::prefix_separator()).
2526 ///
2627 /// For example, the key `CONFIG_DEBUG` would become `DEBUG` with a prefix of `config`.
2728 prefix : Option < String > ,
2829
29- /// Optional character sequence that separates the prefix from the rest of the key
30+ /// Optional character sequence that separates the prefix from the rest of the key.
31+ ///
32+ /// Defaults to [`separator`](Environment::separator()) if that is set, otherwise `_`.
3033 prefix_separator : Option < String > ,
3134
3235 /// Optional character sequence that separates each key segment in an environment key pattern.
@@ -96,8 +99,9 @@ impl Environment {
9699 /// Optional prefix that will limit access to the environment to only keys that
97100 /// begin with the defined prefix.
98101 ///
99- /// A prefix with a separator of `_` is tested to be present on each key before its considered
100- /// to be part of the source environment.
102+ /// The prefix is tested to be present on each key before it's considered to be part of the
103+ /// source environment. The separator character can be set through
104+ /// [`prefix_separator`](Environment::prefix_separator()).
101105 ///
102106 /// For example, the key `CONFIG_DEBUG` would become `DEBUG` with a prefix of `config`.
103107 pub fn with_prefix ( s : & str ) -> Self {
@@ -124,7 +128,9 @@ impl Environment {
124128 self
125129 }
126130
127- /// Optional character sequence that separates the prefix from the rest of the key
131+ /// Optional character sequence that separates the prefix from the rest of the key.
132+ ///
133+ /// Defaults to [`separator`](Environment::separator()) if that is set, otherwise `_`.
128134 pub fn prefix_separator ( mut self , s : & str ) -> Self {
129135 self . prefix_separator = Some ( s. into ( ) ) ;
130136 self
0 commit comments