Can apply wasm to merged events, also for binned queries
This commit is contained in:
@@ -12,10 +12,11 @@ serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
humantime-serde = "1.1.1"
|
||||
async-channel = "1.8.0"
|
||||
bytes = "1.3"
|
||||
bytes = "1.4.0"
|
||||
chrono = { version = "0.4.19", features = ["serde"] }
|
||||
futures-util = "0.3.14"
|
||||
tracing = "0.1.37"
|
||||
url = "2.2"
|
||||
num-traits = "0.2"
|
||||
num-traits = "0.2.16"
|
||||
hex = "0.4.3"
|
||||
err = { path = "../err" }
|
||||
|
||||
10
crates/netpod/src/hex.rs
Normal file
10
crates/netpod/src/hex.rs
Normal 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)
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
pub mod hex;
|
||||
pub mod histo;
|
||||
pub mod query;
|
||||
pub mod range;
|
||||
|
||||
Reference in New Issue
Block a user