#[non_exhaustive]pub struct SettingsDiagnostic {
pub error: WorkshopError,
pub suggestion: Option<String>,
}Expand description
One rejected settings member: the WorkshopError a caller would see,
plus the canonical spelling it was close to when exactly one candidate
qualifies. The error’s message already names the suggestion; the field
lets callers apply or render it without parsing text.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.error: WorkshopErrorThe rejection, with its source span and any suggestion in the message.
suggestion: Option<String>The single canonical spelling the rejected input was close to (a case
or accent difference, or a small edit distance). None when no
candidate is close or several are. The spelling is a Workshop display
name (enabled maps, Château Guillard) — the form source text
should carry — not a canonical table key.
Trait Implementations§
Source§impl Clone for SettingsDiagnostic
impl Clone for SettingsDiagnostic
Source§impl Debug for SettingsDiagnostic
impl Debug for SettingsDiagnostic
impl Eq for SettingsDiagnostic
Source§impl PartialEq for SettingsDiagnostic
impl PartialEq for SettingsDiagnostic
impl StructuralPartialEq for SettingsDiagnostic
Auto Trait Implementations§
impl Freeze for SettingsDiagnostic
impl RefUnwindSafe for SettingsDiagnostic
impl Send for SettingsDiagnostic
impl Sync for SettingsDiagnostic
impl Unpin for SettingsDiagnostic
impl UnsafeUnpin for SettingsDiagnostic
impl UnwindSafe for SettingsDiagnostic
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