use crate::;
pub
pub
/// Trait for all key-value store backends.
///
/// Backends must provide the following semantics:
/// - **Keys are encoded, ordered byte strings**: All key operations should respect the lexicographic ordering of the encoded bytes, as provided by [`KvKey`].
/// - **Atomicity**: `set` and `clear` must complete their operation or return an error.
/// - **Value format**: Values must be raw binary blobs. Serialization and deserialization are handled by the library; the backend just stores the [`u8`] arrays.
/// - **Iteration**: `get_range` should return all keys in `[start, end)` order. If `end` is `None`, iteration should go until the end of the keyspace.
/// - **Error Reporting**: All failures must return a [`KvResult::Err`] with a suitable error value.
///
/// See [`memory_backend`] and (if enabled) [`sqlite_backend`] for correct implementation templates.