pub trait TxReadContext {
type Error;
// Required methods
fn with_read_raw<T>(
&self,
key: RecordKey,
f: impl FnOnce(&[u8]) -> T,
) -> Result<Option<T>, Self::Error>;
fn for_each_record_key(
&self,
kind: RecordKind,
f: &mut dyn FnMut(RecordKey),
);
}Expand description
Read-only raw transaction capability used by typed convenience APIs.
Required Associated Types§
Required Methods§
Sourcefn with_read_raw<T>(
&self,
key: RecordKey,
f: impl FnOnce(&[u8]) -> T,
) -> Result<Option<T>, Self::Error>
fn with_read_raw<T>( &self, key: RecordKey, f: impl FnOnce(&[u8]) -> T, ) -> Result<Option<T>, Self::Error>
Reads a record by key.
Sourcefn for_each_record_key(&self, kind: RecordKind, f: &mut dyn FnMut(RecordKey))
fn for_each_record_key(&self, kind: RecordKind, f: &mut dyn FnMut(RecordKey))
Iterates record keys for one record kind.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.