pub enum DummyError {
Transport(String),
Provider {
status: u16,
body: String,
},
StreamInterrupted(String),
Other(String),
}Expand description
Reference implementation: the shape of error a real provider would ship. Concrete provider crates will define their own.
Variants§
Transport(String)
Network or transport-layer failure.
Provider
Provider returned a non-2xx status with a body.
Fields
StreamInterrupted(String)
Streamed response broke mid-flight.
Other(String)
Anything else, escape hatch.
Trait Implementations§
Source§impl Debug for DummyError
impl Debug for DummyError
Source§impl Display for DummyError
impl Display for DummyError
Source§impl Error for DummyError
impl Error for DummyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl LlmError for DummyError
impl LlmError for DummyError
Source§fn kind(&self) -> LlmErrorKind
fn kind(&self) -> LlmErrorKind
Classify this error so a transport (e.g. the harness’s Connect surface)
can map it onto an accurate status code — telling retryable (rate-limit /
timeout / unavailable) apart from terminal (auth / bad-request) failures
instead of collapsing everything to a catch-all. Read more
Auto Trait Implementations§
impl Freeze for DummyError
impl RefUnwindSafe for DummyError
impl Send for DummyError
impl Sync for DummyError
impl Unpin for DummyError
impl UnsafeUnpin for DummyError
impl UnwindSafe for DummyError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more