Public declaration syntax from forge-rs/crates/forge-embed/src/error.rs Original source SHA-256: 6d3240e5e78a7afd1719ace97c96e290fccda5e395648a43aef69d4377744ac5 Function bodies and constant values are omitted. This is not the complete implementation. Source line 31 #[derive(Debug, Error)] pub enum ForgeEmbedError { /// The embedding model returned an error. #[error("embedding model '{model}' failed: {reason}")] ModelError { /// The model identifier that was used. model: String, /// A description of what went wrong. reason: String, }, /// Vector dimensions do not match for the requested operation. #[error("dimension mismatch: vector A has {a} dimensions but vector B has {b} dimensions; both must be equal for {operation}")] DimensionMismatch { /// Dimensions of the first vector. a: usize, /// Dimensions of the second vector. b: usize, /// The operation that required matching dimensions. operation: String, }, /// An empty input was provided where at least one item is required. #[error("empty input for '{operation}': at least one item is required")] EmptyInput { /// The operation that received empty input. operation: String, }, /// A vector store operation failed. #[error("vector store error during '{operation}': {reason}")] StoreError { /// The store operation that failed (e.g., "insert", "search", "delete"). operation: String, /// A description of what went wrong. reason: String, }, /// A text chunking operation failed. #[error("chunking error: {reason}")] ChunkingError { /// A description of what went wrong during chunking. reason: String, }, /// An error propagated from the `forge-core` crate. #[error(transparent)] Core(#[from] ForgeError), } Source line 81 pub type EmbedResult = Result;