pub trait KvCacheCodec: VectorCodec {
type EncodedCache;
// Required methods
fn encode_kv_cache(
&self,
tensors: &[f32],
shape: KvTensorShape,
) -> Result<Self::EncodedCache, Self::Error>;
fn decode_slice(
&self,
cache: &Self::EncodedCache,
request: KvSliceRequest,
out: &mut [f32],
) -> Result<(), Self::Error>;
}Required Associated Types§
type EncodedCache
Required Methods§
fn encode_kv_cache( &self, tensors: &[f32], shape: KvTensorShape, ) -> Result<Self::EncodedCache, Self::Error>
fn decode_slice( &self, cache: &Self::EncodedCache, request: KvSliceRequest, out: &mut [f32], ) -> Result<(), Self::Error>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".