pub trait VectorQuantizer:
Send
+ Sync
+ Debug {
// Required methods
fn compress(&self, vectors: &[Vec<f32>]) -> Vec<Vec<u8>>;
fn decompress(&self, quantized: &[Vec<u8>]) -> Vec<Vec<f32>>;
}Expand description
向量量化 trait
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".