pub struct ConfigError {
pub problems: Vec<String>,
/* private fields */
}Expand description
An enabled config that cannot be used, with every problem found.
Display renders all of them under one header naming the block the way
KeyNaming spells it; for Dotted("mcp.oauth") that is
mcp.oauth.enabled is true but the OAuth config is not usable:
- <problem>
- <problem>
Fix these, or set mcp.oauth.enabled: false.Fields§
§problems: Vec<String>One human-readable sentence per problem, each naming its setting.
Implementations§
Source§impl ConfigError
impl ConfigError
Sourcepub fn new(naming: KeyNaming<'_>, problems: Vec<String>) -> Self
pub fn new(naming: KeyNaming<'_>, problems: Vec<String>) -> Self
An error listing problems, whose header names settings per naming.
For loaders that add their own problems (parse errors, say) alongside the
ones OAuthConfig::resolve finds.
problems must not be empty: an error with nothing to fix would display
as a header over one blank bullet. Debug builds assert it.
Trait Implementations§
Source§impl Clone for ConfigError
impl Clone for ConfigError
Source§impl Debug for ConfigError
impl Debug for ConfigError
Source§impl Display for ConfigError
impl Display for ConfigError
impl Eq 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 PartialEq for ConfigError
impl PartialEq for ConfigError
impl StructuralPartialEq for ConfigError
Auto Trait Implementations§
impl Freeze for ConfigError
impl RefUnwindSafe for ConfigError
impl Send for ConfigError
impl Sync for ConfigError
impl Unpin for ConfigError
impl UnsafeUnpin 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