Skip to main content

Module error

Module error 

Source
Expand description

Typed error hierarchy for post-cortex-embeddings.

Public API on this crate returns Result<T> (aliased to Result<T, Error>). Internal helpers may still use anyhow::Result for ergonomic error context — the boundary functions wrap them with Error::External.

Variants:

  • Error::ModelLoad — failed to download or open the safetensors model file (hf-hub network / disk / format issues).
  • Error::Tokenization — tokenizer JSON parse failure or encoding mismatch.
  • Error::Inference — candle tensor op error during the forward pass.
  • Error::Dimension — embedding dimension mismatch when an external vector is fed into the wrong index.
  • Error::IndexFull — HNSW index reached its configured capacity.
  • Error::External — last-resort wrapper around anyhow::Error for migrating call sites.

Enums§

Error
Errors produced by crate.

Type Aliases§

Result
Crate-level result alias.