@@ -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///
@@ -126,15 +126,14 @@ pub const MONITOR_UPDATING_PERSISTER_PREPEND_SENTINEL: &[u8] = &[0xFF; 2];
126126/// ways, as long as per-namespace key uniqueness is asserted.
127127///
128128/// Keys and namespaces are required to be valid ASCII strings in the range of
129- /// [`KVSTORE_NAMESPACE_KEY_ALPHABET`] and no longer than [`KVSTORE_NAMESPACE_KEY_MAX_LEN`]. Empty
130- /// primary namespaces and secondary namespaces (`""`) are assumed to be a valid, however, if
131- /// `primary_namespace` is empty, `secondary_namespace` is required to be empty, too. This means
132- /// that concerns should always be separated by primary namespace first, before secondary
133- /// namespaces are used. While the number of primary namespaces will be relatively small and is
134- /// determined at compile time, there may be many secondary namespaces per primary namespace. Note
135- /// that per-namespace uniqueness needs to also hold for keys *and* namespaces in any given
136- /// namespace, i.e., conflicts between keys and equally named
137- /// primary namespaces/secondary namespaces must be avoided.
129+ /// [`NAMESPACE_ALPHABET`] and no longer than [`NAMESPACE_MAX_LEN`]. Empty primary namespaces and
130+ /// secondary namespaces (`""`) are assumed to be a valid, however, if `primary_namespace` is empty,
131+ /// `secondary_namespace` is required to be empty, too. This means that concerns should always be
132+ /// separated by primary namespace first, before secondary namespaces are used. While the number of
133+ /// primary namespaces will be relatively small and is determined at compile time, there may be many
134+ /// secondary namespaces per primary namespace. Note that per-namespace uniqueness needs to also
135+ /// hold for keys *and* namespaces in any given namespace, i.e., conflicts between keys and equally
136+ /// named primary namespaces/secondary namespaces must be avoided.
138137///
139138/// **Note:** Users migrating custom persistence backends from the pre-v0.0.117 `KVStorePersister`
140139/// interface can use a concatenation of `[{primary_namespace}/[{secondary_namespace}/]]{key}` to
@@ -255,15 +254,14 @@ where
255254/// ways, as long as per-namespace key uniqueness is asserted.
256255///
257256/// 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.
257+ /// [`NAMESPACE_ALPHABET`] and no longer than [`NAMESPACE_MAX_LEN`]. Empty primary namespaces and
258+ /// secondary namespaces (`""`) are assumed to be a valid, however, if `primary_namespace` is
259+ /// empty, `secondary_namespace` is required to be empty, too. This means that concerns should
260+ /// always be separated by primary namespace first, before secondary namespaces are used. While the
261+ /// number of primary namespaces will be relatively small and is determined at compile time, there
262+ /// may be many secondary namespaces per primary namespace. Note that per-namespace uniqueness
263+ /// needs to also hold for keys *and* namespaces in any given namespace, i.e., conflicts between
264+ /// keys and equally named primary namespaces/secondary namespaces must be avoided.
267265///
268266/// **Note:** Users migrating custom persistence backends from the pre-v0.0.117 `KVStorePersister`
269267/// interface can use a concatenation of `[{primary_namespace}/[{secondary_namespace}/]]{key}` to
0 commit comments