pub trait Resolver:
Send
+ Sync
+ Clone
+ 'static {
type Family: Family;
type Digest: Digest;
type Op;
type Error: Error + Send + 'static;
// Required method
fn get_operations<'a>(
&'a self,
op_count: Location<Self::Family>,
start_loc: Location<Self::Family>,
max_ops: NonZeroU64,
include_pinned_nodes: bool,
cancel_rx: Receiver<()>,
) -> impl Future<Output = Result<FetchResult<Self::Family, Self::Op, Self::Digest>, Self::Error>> + Send + 'a;
}Expand description
Trait for network communication with the sync server.
Required Associated Types§
Required Methods§
Sourcefn get_operations<'a>(
&'a self,
op_count: Location<Self::Family>,
start_loc: Location<Self::Family>,
max_ops: NonZeroU64,
include_pinned_nodes: bool,
cancel_rx: Receiver<()>,
) -> impl Future<Output = Result<FetchResult<Self::Family, Self::Op, Self::Digest>, Self::Error>> + Send + 'a
fn get_operations<'a>( &'a self, op_count: Location<Self::Family>, start_loc: Location<Self::Family>, max_ops: NonZeroU64, include_pinned_nodes: bool, cancel_rx: Receiver<()>, ) -> impl Future<Output = Result<FetchResult<Self::Family, Self::Op, Self::Digest>, Self::Error>> + Send + 'a
Get the operations starting at start_loc in the database, up to max_ops operations.
Returns the operations and a proof that they were present in the database when it had
op_count operations. If include_pinned_nodes is true, the result will include the
pinned merkle nodes at start_loc.
The corresponding cancel_tx is dropped when the engine no longer needs this
request (e.g. due to a target update), causing cancel_rx.await to return
Err. Implementations may select! on it to abort in-flight work early.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".