#[non_exhaustive]pub enum BackendConstructError {
UnknownFamily {
family: String,
},
Provider {
family: &'static str,
source: BoxError,
},
}Expand description
Constructing a backend failed: a precondition or setup failure.
Produced only by LlmBackend::new and
BackendFactory::create. Distinct from BackendError
(operating a backend) and CapabilityError (static capability gating): construction never
performs a chat call, so its failure model is isolated.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnknownFamily
No constructor is registered for the requested family (factory dispatch).
Provider
The provider client could not be built.
Carries the backend family for attribution and the provider build failure as a boxed
source, so callers can downcast to inspect TransportError::InvalidConfig /
TransportError::BuildClient for the built-in backends, while custom backends may box any
SDK-specific error.
Implementations§
Trait Implementations§
Source§impl Debug for BackendConstructError
impl Debug for BackendConstructError
Source§impl Display for BackendConstructError
impl Display for BackendConstructError
Source§impl Error for BackendConstructError
impl Error for BackendConstructError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for BackendConstructError
impl !UnwindSafe for BackendConstructError
impl Freeze for BackendConstructError
impl Send for BackendConstructError
impl Sync for BackendConstructError
impl Unpin for BackendConstructError
impl UnsafeUnpin for BackendConstructError
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