Validated key/value batch operations for a KV store.
// Source: https://github.com/astrid-runtime/astrid | License: Apache-2.0 | Copyright 2025 Joshua J. Bouw and Unicity Labs
// Provided via justclaw.it.com; keep this notice with the code.
//! Bounded, canonical conditional key/value mutations.
//!
//! A [`KvMutationBatch`] is validated before it reaches a backend. The
//! validation is deliberately independent of the backend so that every
//! implementation observes the same operation count, payload, key, and
//! duplicate rules.
use std::cmp::Ordering;
use crate::error::{StorageError, StorageResult};
use super::{composite_key, validate_key, validate_namespace};
/// Maximum number of conditions and mutations accepted by one batch.
pub const MAX_KV_BATCH_OPERATIONS: usize = 1024;
/// Maximum declared key/value payload accepted by one
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key