pub trait ErasedContentStore:
Send
+ Sync
+ 'static {
// Required methods
fn get_erased<'a>(
&'a self,
interest: &'a Interest,
) -> Pin<Box<dyn Future<Output = Option<CsEntry>> + Send + 'a>>;
fn insert_erased(
&self,
data: Bytes,
name: Arc<Name>,
meta: CsMeta,
) -> Pin<Box<dyn Future<Output = InsertResult> + Send + '_>>;
fn evict_erased<'a>(
&'a self,
name: &'a Name,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'a>>;
fn evict_prefix_erased<'a>(
&'a self,
prefix: &'a Name,
limit: Option<usize>,
) -> Pin<Box<dyn Future<Output = usize> + Send + 'a>>;
fn capacity(&self) -> CsCapacity;
fn set_capacity(&self, max_bytes: usize);
fn len(&self) -> usize;
fn is_empty(&self) -> bool;
fn current_bytes(&self) -> usize;
fn variant_name(&self) -> &str;
fn stats(&self) -> CsStats;
}Expand description
Object-safe version of ContentStore that boxes its futures.
Follows the same pattern as ErasedStrategy — a blanket impl automatically
wraps any ContentStore implementor, so custom CS implementations only need
to implement ContentStore.