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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".