MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / to_bytes

Method to_bytes

nodedb-vector/src/rerank/codecs/bbq.rs:220–227  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

218 }
219
220 fn to_bytes(&self) -> Result<Vec<u8>, RerankError> {
221 let codec = self.codec.as_ref().ok_or_else(|| {
222 RerankError::NotTrained("bbq sidecar serialize: codec not trained".to_string())
223 })?;
224 codec
225 .to_bytes()
226 .map_err(|e| RerankError::BadInput(format!("bbq to_bytes: {e}")))
227 }
228
229 /// Calibrate from a sample of vectors.
230 ///

Callers

nothing calls this directly

Calls 2

to_stringMethod · 0.80
as_refMethod · 0.45

Tested by

no test coverage detected