Can apply wasm to merged events, also for binned queries

This commit is contained in:
Dominik Werder
2023-08-22 15:56:10 +02:00
parent 9aec274899
commit b8a8ecd537
13 changed files with 364 additions and 63 deletions

10
crates/netpod/src/hex.rs Normal file
View File

@@ -0,0 +1,10 @@
/// Input may also contain whitespace.
pub fn decode_hex<INP: AsRef<str>>(inp: INP) -> Result<Vec<u8>, ()> {
let a: Vec<_> = inp
.as_ref()
.bytes()
.filter(|&x| (x >= b'0' && x <= b'9') || (x >= b'a' && x <= b'f'))
.collect();
let ret = hex::decode(a).map_err(|_| ())?;
Ok(ret)
}

View File

@@ -1,3 +1,4 @@
pub mod hex;
pub mod histo;
pub mod query;
pub mod range;