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,
};
#[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>),
}