armour 0.30.27

DDL and serialization for key-value storage
Documentation
// Shared request-side types and wire helpers come from the client crate.
pub(crate) use armour_rpc::protocol::{
    OpCode, Request, RequestPayload, UpsertKey, read_bound, read_bytes, read_u8, read_u32_be,
    read_u64_be, read_upsert_key,
};

// Server-side response types — the server constructs typed payloads,
// so these stay here rather than in the shared protocol crate.

#[derive(Debug)]
pub(crate) enum Response {
    Ok(ResponsePayload),
    Err { code: u16, message: String },
}

use super::collections::CollectionMeta;

#[derive(Debug)]
pub(crate) enum ResponsePayload {
    Empty,
    OptionalData(Option<Vec<u8>>),
    OptionalLen(Option<u32>),
    OptionalKV(Option<(Vec<u8>, Vec<u8>)>),
    KeyValues(Vec<(Vec<u8>, Vec<u8>)>),
    Keys(Vec<Vec<u8>>),
    Key(Vec<u8>),
    Count(u64),
    Collections(Vec<CollectionMeta>),
}