@@ -40,11 +40,11 @@ use crate::util::native_async::FutureSpawner;
4040use crate :: util:: ser:: { Readable , ReadableArgs , Writeable } ;
4141
4242/// The alphabet of characters allowed for namespaces and keys.
43- pub const KVSTORE_NAMESPACE_KEY_ALPHABET : & str =
43+ pub const NAMESPACE_ALPHABET : & str =
4444 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-" ;
4545
4646/// The maximum number of characters namespaces and keys may have.
47- pub const KVSTORE_NAMESPACE_KEY_MAX_LEN : usize = 120 ;
47+ pub const NAMESPACE_MAX_LEN : usize = 120 ;
4848
4949/// The primary namespace under which the [`ChannelManager`] will be persisted.
5050///
@@ -198,15 +198,14 @@ where
198198/// ways, as long as per-namespace key uniqueness is asserted.
199199///
200200/// Keys and namespaces are required to be valid ASCII strings in the range of
201- /// [`KVSTORE_NAMESPACE_KEY_ALPHABET`] and no longer than [`KVSTORE_NAMESPACE_KEY_MAX_LEN`]. Empty
202- /// primary namespaces and secondary namespaces (`""`) are assumed to be a valid, however, if
203- /// `primary_namespace` is empty, `secondary_namespace` is required to be empty, too. This means
204- /// that concerns should always be separated by primary namespace first, before secondary
205- /// namespaces are used. While the number of primary namespaces will be relatively small and is
206- /// determined at compile time, there may be many secondary namespaces per primary namespace. Note
207- /// that per-namespace uniqueness needs to also hold for keys *and* namespaces in any given
208- /// namespace, i.e., conflicts between keys and equally named
209- /// primary namespaces/secondary namespaces must be avoided.
201+ /// [`NAMESPACE_ALPHABET`] and no longer than [`NAMESPACE_MAX_LEN`]. Empty primary namespaces and
202+ /// secondary namespaces (`""`) are assumed to be a valid, however, if `primary_namespace` is
203+ /// empty, `secondary_namespace` is required to be empty, too. This means that concerns should
204+ /// always be separated by primary namespace first, before secondary namespaces are used. While the
205+ /// number of primary namespaces will be relatively small and is determined at compile time, there
206+ /// may be many secondary namespaces per primary namespace. Note that per-namespace uniqueness
207+ /// needs to also hold for keys *and* namespaces in any given namespace, i.e., conflicts between
208+ /// keys and equally named primary namespaces/secondary namespaces must be avoided.
210209///
211210/// **Note:** Users migrating custom persistence backends from the pre-v0.0.117 `KVStorePersister`
212211/// interface can use a concatenation of `[{primary_namespace}/[{secondary_namespace}/]]{key}` to
0 commit comments