#[non_exhaustive]pub struct ConfigProblem { /* private fields */ }Expand description
One configuration problem: its ProblemKind, the settings it names, and
the human-readable sentence.
kind and keys are what a caller matches on;
message (also its Display) is for people, and its
wording may change in any release. #[non_exhaustive].
An application loader mixes its own problems in with
ConfigProblem::from(String) (kind ProblemKind::Other) or
ConfigProblem::new.
Implementations§
Source§impl ConfigProblem
impl ConfigProblem
Sourcepub fn new(
kind: ProblemKind,
keys: impl IntoIterator<Item = impl Into<String>>,
message: impl Into<String>,
) -> Self
pub fn new( kind: ProblemKind, keys: impl IntoIterator<Item = impl Into<String>>, message: impl Into<String>, ) -> Self
A problem of kind naming keys (already spelled the way the error’s
KeyNaming spells them), described by message.
Sourcepub fn kind(&self) -> ProblemKind
pub fn kind(&self) -> ProblemKind
What kind of problem this is.
Trait Implementations§
Source§impl Clone for ConfigProblem
impl Clone for ConfigProblem
Source§impl Debug for ConfigProblem
impl Debug for ConfigProblem
Source§impl Display for ConfigProblem
impl Display for ConfigProblem
impl Eq for ConfigProblem
Source§impl From<String> for ConfigProblem
impl From<String> for ConfigProblem
Source§fn from(message: String) -> Self
fn from(message: String) -> Self
A problem of kind ProblemKind::Other with no keys.
Source§impl PartialEq for ConfigProblem
impl PartialEq for ConfigProblem
impl StructuralPartialEq for ConfigProblem
Auto Trait Implementations§
impl Freeze for ConfigProblem
impl RefUnwindSafe for ConfigProblem
impl Send for ConfigProblem
impl Sync for ConfigProblem
impl Unpin for ConfigProblem
impl UnsafeUnpin for ConfigProblem
impl UnwindSafe for ConfigProblem
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