pub trait KvCacheEventSink: Send + Sync {
// Required method
fn publish(&self, event: KvCacheEvent) -> Result<()>;
// Provided methods
fn publish_with_storage_tier(
&self,
event: KvCacheEvent,
_storage_tier: StorageTier,
) -> Result<()> { ... }
fn publish_batch_with_storage_tiers(
&self,
events: Vec<(KvCacheEvent, StorageTier)>,
) -> Result<()> { ... }
}Expand description
Trait for publishing KV cache events. This abstracts the runtime dependency so mocker components can remain generic.
Required Methods§
fn publish(&self, event: KvCacheEvent) -> Result<()>
Provided Methods§
fn publish_with_storage_tier( &self, event: KvCacheEvent, _storage_tier: StorageTier, ) -> Result<()>
Sourcefn publish_batch_with_storage_tiers(
&self,
events: Vec<(KvCacheEvent, StorageTier)>,
) -> Result<()>
fn publish_batch_with_storage_tiers( &self, events: Vec<(KvCacheEvent, StorageTier)>, ) -> Result<()>
Publishes events that share one source visibility boundary.
Implementations that do not have a native batch representation retain singleton delivery semantics by default.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".