MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / redb_err

Function redb_err

nodedb/src/engine/sparse/btree.rs:18–23  ·  view source on GitHub ↗

Map a redb error into our crate error with context.

(ctx: &str, e: E)

Source from the content-addressed store, hash-verified

16
17/// Map a redb error into our crate error with context.
18pub(super) fn redb_err<E: std::fmt::Display>(ctx: &str, e: E) -> crate::Error {
19 crate::Error::Storage {
20 engine: "sparse".into(),
21 detail: format!("{ctx}: {e}"),
22 }
23}
24
25std::thread_local! {
26 static KEY_BUF: std::cell::RefCell<String> = std::cell::RefCell::new(String::with_capacity(256));

Callers 15

openMethod · 0.70
putMethod · 0.70
put_in_txnMethod · 0.70
exists_in_txnMethod · 0.70
batch_putMethod · 0.70
getMethod · 0.70
deleteMethod · 0.70
begin_writeMethod · 0.70
rename_collectionMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected