pub struct RegistrySnapshot {
pub id: String,
pub fingerprint: String,
pub catalogs: Vec<ProviderCatalog>,
pub compiled_validator_count: usize,
pub cached_openapi_bytes: Arc<Vec<u8>>,
pub cached_catalog_summary: Arc<Value>,
/* private fields */
}Expand description
An immutable, fingerprinted view of the loaded providers: their catalogs, routing/resource indexes, and cached derived artifacts.
Fields§
§id: StringSnapshot identifier (equal to the fingerprint).
fingerprint: StringContent fingerprint of the loaded provider set.
catalogs: Vec<ProviderCatalog>Catalogs for every loaded provider.
compiled_validator_count: usizeNumber of JSON schema validators compiled for this snapshot.
cached_openapi_bytes: Arc<Vec<u8>>Cached, pre-serialized OpenAPI document bytes.
cached_catalog_summary: Arc<Value>Cached catalog summary JSON.
Implementations§
Source§impl RegistrySnapshot
impl RegistrySnapshot
Sourcepub fn validation_summary(&self) -> Value
pub fn validation_summary(&self) -> Value
A compact JSON summary confirming the snapshot validated: fingerprint, provider/action/validator counts, and the action list.
Sourcepub fn inspection_report(&self) -> Value
pub fn inspection_report(&self) -> Value
A detailed JSON report of every provider in the snapshot — its tools, prompts, resources, per-surface enablement, and runtime security posture — for inspection endpoints.
Source§impl RegistrySnapshot
impl RegistrySnapshot
Sourcepub fn dynamic_resource_templates(&self) -> &[(String, DynamicResourceTemplate)]
pub fn dynamic_resource_templates(&self) -> &[(String, DynamicResourceTemplate)]
Every provider’s dynamic resource templates, for resources/templates/list.
Sourcepub fn exact_resources(&self) -> impl Iterator<Item = &ProviderResource>
pub fn exact_resources(&self) -> impl Iterator<Item = &ProviderResource>
The live, MCP-visible, readable exact resources — i.e. exactly the
set resources/read can actually resolve. Already excludes
resources from providers that can’t serve reads
(!supports_resource_reads()) and resources explicitly disabled via
mcp: { enabled: false }, since both are filtered out before
insertion in ResourceIndex::register. Use this for
resources/list instead of walking raw catalogs directly, or the
list can advertise resources that always fail to read.
Sourcepub fn match_resource(
&self,
uri: &str,
) -> Option<(&str, BTreeMap<String, String>, Option<&str>)>
pub fn match_resource( &self, uri: &str, ) -> Option<(&str, BTreeMap<String, String>, Option<&str>)>
Resolves a request resource URI against exact resources first, then
dynamic templates in precedence order (exact-dynamic before
parameterized before catch-all — enforced by trying shorter/no-param
matches first via is_dynamic()), returning the owning provider
name, captured params, and the required scope (if any), regardless
of which tier matched.
Source§impl RegistrySnapshot
impl RegistrySnapshot
Sourcepub fn action_names(&self) -> Vec<&str>
pub fn action_names(&self) -> Vec<&str>
The names of every action in this snapshot.
Sourcepub fn route_action(&self, method: &str, path: &str) -> Option<&str>
pub fn route_action(&self, method: &str, path: &str) -> Option<&str>
Resolves a REST method+path to its action name, if routed.
Sourcepub fn cli_action(&self, command: &str) -> Option<&str>
pub fn cli_action(&self, command: &str) -> Option<&str>
Resolves a CLI command to its action name, if routed.
Sourcepub fn primitive_kind(&self, name: &str) -> Option<&str>
pub fn primitive_kind(&self, name: &str) -> Option<&str>
The primitive kind (tool/prompt/resource) for a named primitive.
Sourcepub fn action_requires_confirmation(&self, action: &str) -> bool
pub fn action_requires_confirmation(&self, action: &str) -> bool
Whether the action is marked destructive and requires confirmation.
Sourcepub fn provider_for_action(&self, action: &str) -> Option<&str>
pub fn provider_for_action(&self, action: &str) -> Option<&str>
The provider that owns the given action.
Sourcepub fn core_snapshot(&self) -> &CoreRegistrySnapshot
pub fn core_snapshot(&self) -> &CoreRegistrySnapshot
Borrows the underlying product-neutral core snapshot.
Trait Implementations§
Source§impl Clone for RegistrySnapshot
impl Clone for RegistrySnapshot
Source§fn clone(&self) -> RegistrySnapshot
fn clone(&self) -> RegistrySnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for RegistrySnapshot
impl !RefUnwindSafe for RegistrySnapshot
impl Send for RegistrySnapshot
impl Sync for RegistrySnapshot
impl Unpin for RegistrySnapshot
impl UnsafeUnpin for RegistrySnapshot
impl !UnwindSafe for RegistrySnapshot
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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