pub struct ConfigGuidance {
pub kind: MisconfigurationKind,
pub setting: &'static str,
pub location: &'static str,
pub fix: Cow<'static, str>,
}Expand description
Actionable guidance for fixing a misconfiguration.
All strings are static to avoid allocation on the failure path.
Callers format them with ConfigGuidance::user_message.
Fields§
§kind: MisconfigurationKindWhat kind of misconfiguration was detected.
setting: &'static strSettings key to check (e.g. agent.model).
location: &'static strWhere the setting lives (e.g. vtcode.toml).
fix: Cow<'static, str>Actionable fix steps.
Implementations§
Source§impl ConfigGuidance
impl ConfigGuidance
Sourcepub fn user_message(&self) -> String
pub fn user_message(&self) -> String
Render a user-facing message that directs to settings/config first.
Trait Implementations§
Source§impl Clone for ConfigGuidance
impl Clone for ConfigGuidance
Source§fn clone(&self) -> ConfigGuidance
fn clone(&self) -> ConfigGuidance
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 ConfigGuidance
impl Debug for ConfigGuidance
impl Eq for ConfigGuidance
Source§impl PartialEq for ConfigGuidance
impl PartialEq for ConfigGuidance
impl StructuralPartialEq for ConfigGuidance
Auto Trait Implementations§
impl Freeze for ConfigGuidance
impl RefUnwindSafe for ConfigGuidance
impl Send for ConfigGuidance
impl Sync for ConfigGuidance
impl Unpin for ConfigGuidance
impl UnsafeUnpin for ConfigGuidance
impl UnwindSafe for ConfigGuidance
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.