mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
add ArrayVec-backed serialized query overload; doc comments
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use std::{convert::AsRef, fmt::Debug, io::Write};
|
||||
|
||||
use arrayvec::ArrayVec;
|
||||
use conduit::implement;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -14,6 +15,15 @@ where
|
||||
self.bdel(key, &mut buf);
|
||||
}
|
||||
|
||||
#[implement(super::Map)]
|
||||
pub fn adel<const MAX: usize, K>(&self, key: &K)
|
||||
where
|
||||
K: Serialize + ?Sized + Debug,
|
||||
{
|
||||
let mut buf = ArrayVec::<u8, MAX>::new();
|
||||
self.bdel(key, &mut buf);
|
||||
}
|
||||
|
||||
#[implement(super::Map)]
|
||||
#[tracing::instrument(skip(self, buf), fields(%self), level = "trace")]
|
||||
pub fn bdel<K, B>(&self, key: &K, buf: &mut B)
|
||||
|
||||
Reference in New Issue
Block a user