pub enum ConfigError {
MissingField {
field: String,
},
InvalidValue {
field: String,
message: String,
},
InvalidUrl {
url: String,
},
InvalidApiKey,
ValidationFailed {
message: String,
},
}
Expand description
Common configuration errors.
Variants§
MissingField
Missing required configuration field
InvalidValue
Invalid configuration value
InvalidUrl
Invalid URL format
InvalidApiKey
Invalid API key format
ValidationFailed
Configuration validation failed
Implementations§
Source§impl ConfigError
impl ConfigError
Sourcepub fn missing_field(field: impl Into<String>) -> ConfigError
pub fn missing_field(field: impl Into<String>) -> ConfigError
Create a missing field error
Sourcepub fn invalid_value(
field: impl Into<String>,
message: impl Into<String>,
) -> ConfigError
pub fn invalid_value( field: impl Into<String>, message: impl Into<String>, ) -> ConfigError
Create an invalid value error
Sourcepub fn invalid_url(url: impl Into<String>) -> ConfigError
pub fn invalid_url(url: impl Into<String>) -> ConfigError
Create an invalid URL error
Sourcepub fn validation_failed(message: impl Into<String>) -> ConfigError
pub fn validation_failed(message: impl Into<String>) -> ConfigError
Create a validation failed error
Trait Implementations§
Source§impl Debug for ConfigError
impl Debug for ConfigError
Source§impl Display for ConfigError
impl Display for ConfigError
Source§impl Error for ConfigError
impl Error for ConfigError
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<E> From<ConfigError> for LlmError<E>where
E: ProviderError,
impl<E> From<ConfigError> for LlmError<E>where
E: ProviderError,
Source§fn from(source: ConfigError) -> LlmError<E>
fn from(source: ConfigError) -> LlmError<E>
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ConfigError
impl RefUnwindSafe for ConfigError
impl Send for ConfigError
impl Sync for ConfigError
impl Unpin for ConfigError
impl UnwindSafe for ConfigError
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