add ArrayVec-backed serialized query overload; doc comments

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk authored and strawberry committed 2024-10-25 00:32:33 -04:00
1 parent 5192927a53
commit 0e8ae1e13e
6 files changed
+52 -13

No files matched your search

+10
View File
@@ -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)