use alloc::string::String;
use alloc::vec::Vec;
use serde::{Deserialize, Serialize};
use crate::db::Scope;
#[derive(Debug, Serialize, Deserialize)]
#[allow(missing_docs)]
pub struct PutRequest {
pub scope: Scope,
pub key: String,
pub value: Vec<u8>,
}
#[derive(Debug, Serialize, Deserialize)]
#[allow(missing_docs)]
pub struct GetRequest {
pub scope: Scope,
pub key: String,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct GetResponse {
pub payload: Option<Vec<u8>>,
}
#[derive(Debug, Serialize, Deserialize)]
#[allow(missing_docs)]
pub struct DeleteRequest {
pub scope: Scope,
pub key: String,
}
#[derive(Debug, Serialize, Deserialize)]
#[allow(missing_docs)]
pub struct PrefixRequest {
pub scope: Scope,
pub prefix: String,
}
#[derive(Debug, Serialize, Deserialize)]
#[allow(missing_docs)]
pub struct PrefixResponse {
pub keys: Vec<String>,
}