pub struct MockConfig {
pub rows: Vec<ConfigShowRow>,
pub findings: Vec<ConfigDoctorFinding>,
}Expand description
In-memory ConfigSource used by tests. Lets a test fix a
deterministic set of rows + findings without touching
zero-config or the filesystem.
Fields§
§rows: Vec<ConfigShowRow>§findings: Vec<ConfigDoctorFinding>Implementations§
Source§impl MockConfig
impl MockConfig
Trait Implementations§
Source§impl Clone for MockConfig
impl Clone for MockConfig
Source§fn clone(&self) -> MockConfig
fn clone(&self) -> MockConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ConfigSource for MockConfig
impl ConfigSource for MockConfig
Source§fn show(&self) -> Vec<ConfigShowRow>
fn show(&self) -> Vec<ConfigShowRow>
Rows for
/config show. Order is preserved verbatim in
the rendered output — the adapter decides the column
order so it can group identity → engine → guardrails →
display without the dispatcher needing to know the
schema.Source§fn doctor(&self) -> Vec<ConfigDoctorFinding>
fn doctor(&self) -> Vec<ConfigDoctorFinding>
Findings for
/config doctor. Return order is
preserved; the adapter is responsible for ordering
(errors first is a reasonable default, but the trait
does not mandate it because a “summary then detail”
shape is sometimes clearer).Source§impl Debug for MockConfig
impl Debug for MockConfig
Source§impl Default for MockConfig
impl Default for MockConfig
Source§fn default() -> MockConfig
fn default() -> MockConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MockConfig
impl RefUnwindSafe for MockConfig
impl Send for MockConfig
impl Sync for MockConfig
impl Unpin for MockConfig
impl UnsafeUnpin for MockConfig
impl UnwindSafe for MockConfig
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