pub struct SettingWarning {
pub section: String,
pub key: String,
pub did_you_mean: Option<&'static str>,
}Expand description
Something in config.toml that was read and then ignored.
A warning rather than an error, deliberately: refusing an unknown key would
mean an older binary could not read a config written for a newer one, which
is a worse failure than a typo. But silence is worse than both — a
misspelled w_vec changes no behaviour and says nothing, and the user is
left believing they tuned something.
Fields§
§section: StringThe TOML section it appeared in, without brackets. Empty for an unknown
section, where Self::key is the section’s own name.
key: StringThe key (or section) nobody claimed.
did_you_mean: Option<&'static str>The closest known name, when one is close enough to be worth offering.
Trait Implementations§
Source§impl Clone for SettingWarning
impl Clone for SettingWarning
Source§fn clone(&self) -> SettingWarning
fn clone(&self) -> SettingWarning
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SettingWarning
impl Debug for SettingWarning
Source§impl Display for SettingWarning
impl Display for SettingWarning
impl Eq for SettingWarning
Source§impl PartialEq for SettingWarning
impl PartialEq for SettingWarning
impl StructuralPartialEq for SettingWarning
Auto Trait Implementations§
impl Freeze for SettingWarning
impl RefUnwindSafe for SettingWarning
impl Send for SettingWarning
impl Sync for SettingWarning
impl Unpin for SettingWarning
impl UnsafeUnpin for SettingWarning
impl UnwindSafe for SettingWarning
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.