pub struct McpDiagnostics {
pub statuses: Vec<ServerStatus>,
pub issues: Vec<McpIssue>,
pub tools: Vec<String>,
}Expand description
What a run should say about its MCP configuration.
Why: the Fail-Open Check — a caller must be able to tell “no servers are
configured” from “the configuration is broken”, and that difference is only
legible if the findings travel with the result. statuses is the
per-server answer; issues is everything wrong with a FILE or refused by
the trust gate.
What: tools names every tool actually registered, in registration order.
Test: tests::set_tests::a_malformed_global_file_reaches_the_diagnostics.
Fields§
§statuses: Vec<ServerStatus>One entry per configured server, in resolver order.
issues: Vec<McpIssue>Everything wrong with either tier’s file, or refused by the trust gate.
tools: Vec<String>The composed names of every tool registered.
Implementations§
Source§impl McpDiagnostics
impl McpDiagnostics
Sourcepub fn usable_count(&self) -> usize
pub fn usable_count(&self) -> usize
How many configured servers this run is actually connected to.
Test: tests::set_tests::an_unconfigured_run_registers_nothing_and_reports_nothing.
Sourcepub fn log(&self)
pub fn log(&self)
Emit the run’s MCP state: info for what worked, warn for what did not.
Why: the two registry-building sites should not each decide how to
narrate this, and a broken config must reach stderr whether or not the
caller renders the struct.
Test: tests::set_tests::a_malformed_global_file_reaches_the_diagnostics
covers the data; the log calls themselves carry no branching logic.
Trait Implementations§
Source§impl Clone for McpDiagnostics
impl Clone for McpDiagnostics
Source§impl Debug for McpDiagnostics
impl Debug for McpDiagnostics
Auto Trait Implementations§
impl Freeze for McpDiagnostics
impl RefUnwindSafe for McpDiagnostics
impl Send for McpDiagnostics
impl Sync for McpDiagnostics
impl Unpin for McpDiagnostics
impl UnsafeUnpin for McpDiagnostics
impl UnwindSafe for McpDiagnostics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more