pub trait PresenceChecker: Send + Sync {
// Required method
fn check_presence(
&self,
keys: Vec<SequenceHash>,
) -> BoxFuture<'static, Vec<(SequenceHash, bool)>>;
}Expand description
Async presence checker for object storage or other external destinations.
This trait abstracts presence checking for destinations that require async
operations (like S3, caching services). Unlike BlockRegistry::check_presence
which is synchronous, this is designed for remote/external destinations.
§Implementations
S3PresenceChecker: WrapsObjectBlockOps::has_blocks()for S3/object storage- Future:
CachedPresenceChecker- local bloom filter / LRU cache layer - Future:
DistributedCacheChecker- remote caching service
Required Methods§
Sourcefn check_presence(
&self,
keys: Vec<SequenceHash>,
) -> BoxFuture<'static, Vec<(SequenceHash, bool)>>
fn check_presence( &self, keys: Vec<SequenceHash>, ) -> BoxFuture<'static, Vec<(SequenceHash, bool)>>
Check if blocks exist at the destination.
Returns a vector of (SequenceHash, exists: bool) pairs.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".