@@ -41,11 +41,11 @@ use crate::util::ser::{Readable, ReadableArgs, Writeable};
4141use crate :: util:: wakers:: Notifier ;
4242
4343/// The alphabet of characters allowed for namespaces and keys.
44- pub const KVSTORE_NAMESPACE_KEY_ALPHABET : & str =
44+ pub const NAMESPACE_ALPHABET : & str =
4545 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-" ;
4646
4747/// The maximum number of characters namespaces and keys may have.
48- pub const KVSTORE_NAMESPACE_KEY_MAX_LEN : usize = 120 ;
48+ pub const NAMESPACE_MAX_LEN : usize = 120 ;
4949
5050/// The primary namespace under which the [`ChannelManager`] will be persisted.
5151///
@@ -255,15 +255,14 @@ where
255255/// ways, as long as per-namespace key uniqueness is asserted.
256256///
257257/// Keys and namespaces are required to be valid ASCII strings in the range of
258- /// [`KVSTORE_NAMESPACE_KEY_ALPHABET`] and no longer than [`KVSTORE_NAMESPACE_KEY_MAX_LEN`]. Empty
259- /// primary namespaces and secondary namespaces (`""`) are assumed to be a valid, however, if
260- /// `primary_namespace` is empty, `secondary_namespace` is required to be empty, too. This means
261- /// that concerns should always be separated by primary namespace first, before secondary
262- /// namespaces are used. While the number of primary namespaces will be relatively small and is
263- /// determined at compile time, there may be many secondary namespaces per primary namespace. Note
264- /// that per-namespace uniqueness needs to also hold for keys *and* namespaces in any given
265- /// namespace, i.e., conflicts between keys and equally named
266- /// primary namespaces/secondary namespaces must be avoided.
258+ /// [`NAMESPACE_ALPHABET`] and no longer than [`NAMESPACE_MAX_LEN`]. Empty primary namespaces and
259+ /// secondary namespaces (`""`) are assumed to be a valid, however, if `primary_namespace` is
260+ /// empty, `secondary_namespace` is required to be empty, too. This means that concerns should
261+ /// always be separated by primary namespace first, before secondary namespaces are used. While the
262+ /// number of primary namespaces will be relatively small and is determined at compile time, there
263+ /// may be many secondary namespaces per primary namespace. Note that per-namespace uniqueness
264+ /// needs to also hold for keys *and* namespaces in any given namespace, i.e., conflicts between
265+ /// keys and equally named primary namespaces/secondary namespaces must be avoided.
267266///
268267/// **Note:** Users migrating custom persistence backends from the pre-v0.0.117 `KVStorePersister`
269268/// interface can use a concatenation of `[{primary_namespace}/[{secondary_namespace}/]]{key}` to
0 commit comments