pub trait ReadSync {
// Required methods
fn as_any(&self) -> &dyn Any;
fn sync_get(&mut self, request: GetRequest) -> Result<ProofResponse>;
fn sync_get_prefixes(
&mut self,
request: GetPrefixesRequest,
) -> Result<ProofResponse>;
fn sync_iterate(&mut self, request: IterateRequest) -> Result<ProofResponse>;
}
Expand description
ReadSync is the interface for synchronizing the in-memory cache with another (potentially untrusted) MKVS.
Required Methods§
sourcefn sync_get(&mut self, request: GetRequest) -> Result<ProofResponse>
fn sync_get(&mut self, request: GetRequest) -> Result<ProofResponse>
Fetch a single key and returns the corresponding proof.
sourcefn sync_get_prefixes(
&mut self,
request: GetPrefixesRequest,
) -> Result<ProofResponse>
fn sync_get_prefixes( &mut self, request: GetPrefixesRequest, ) -> Result<ProofResponse>
Fetch all keys under the given prefixes and returns the corresponding proofs.
sourcefn sync_iterate(&mut self, request: IterateRequest) -> Result<ProofResponse>
fn sync_iterate(&mut self, request: IterateRequest) -> Result<ProofResponse>
Seek to a given key and then fetch the specified number of following items based on key iteration order.