pub trait StateSource {
// Required methods
fn row(&self, key: &[u8]) -> Result<Option<Vec<u8>>, ExecError>;
fn node(&self, key: &[u8]) -> Result<Option<Vec<u8>>, ExecError>;
fn for_each_row(
&self,
prefix: &[u8],
visit: &mut dyn FnMut(&[u8], &[u8]),
) -> Result<(), ExecError>;
}Expand description
今の状態の行と木のノードを読む口
Required Methods§
Sourcefn row(&self, key: &[u8]) -> Result<Option<Vec<u8>>, ExecError>
fn row(&self, key: &[u8]) -> Result<Option<Vec<u8>>, ExecError>
状態の行 key(super::persist::row_key)。なければ None
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<S: StateSource + ?Sized> StateSource for Arc<S>
分け合っている読み口。ほかのスレッドと同じ DB を読むとき
impl<S: StateSource + ?Sized> StateSource for Arc<S>
分け合っている読み口。ほかのスレッドと同じ DB を読むとき