A searchable-model layer for Rust: make a type searchable, keep the index in sync, and search with real relevance ranking — over a pluggable backend, with a batteries-included in-memory engine that needs no external service.
// searchez/src/error.rs
usethiserror::Error;/// What can go wrong talking to a search backend.
#[derive(Debug, Error)]pubenumSearchError{/// The backend rejected or failed an operation (network, server, I/O).
#[error("search backend error: {0}")]
Backend(String),/// A document was missing the id field, or an id couldn't be represented.
#[error("invalid document: {0}")]
InvalidDocument(String),}pubtypeResult<T>=std::result::Result<T, SearchError>;