synwire_core/error/kind.rs
1//! Error kind discriminants for retry and fallback matching.
2
3/// Discriminant enum for matching errors without payload.
4///
5/// Used by `RetryConfig` and `with_fallbacks` to specify which
6/// error categories to handle.
7#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
8#[non_exhaustive]
9pub enum SynwireErrorKind {
10 /// Model invocation error.
11 Model,
12 /// Prompt formatting error.
13 Prompt,
14 /// Output parsing error.
15 Parse,
16 /// Embedding error.
17 Embedding,
18 /// Vector store error.
19 VectorStore,
20 /// Tool invocation error.
21 Tool,
22 /// Retry exhausted.
23 RetryExhausted,
24 /// Serialization error.
25 Serialization,
26 /// Graph execution error.
27 Graph,
28 /// Credential error.
29 Credential,
30 /// Other error.
31 Other,
32}