pub struct BoxError(/* private fields */);Expand description
A provider error erased to one concrete type, so backends with differing
associated Errors can be stored behind a single trait object.
Transparent wrapper: Display delegates to the inner
error and source exposes it, so logs and
error chains read exactly as the un-erased error did. The second field
preserves the original LlmErrorKind across erasure (the boxed dyn Error
alone could not be re-classified).
Implementations§
Trait Implementations§
Source§impl Error for BoxError
impl Error for BoxError
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 BoxError
impl LlmError for BoxError
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 !RefUnwindSafe for BoxError
impl !UnwindSafe for BoxError
impl Freeze for BoxError
impl Send for BoxError
impl Sync for BoxError
impl Unpin for BoxError
impl UnsafeUnpin for BoxError
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