pub struct McpRuntime { /* private fields */ }Expand description
The MCP server plus everything it needs, constructed once at startup.
Implementations§
Source§impl McpRuntime
impl McpRuntime
Sourcepub fn build(
state: ServerState,
config: &ResolvedMcpConfig,
) -> Result<Self, ServerError>
pub fn build( state: ServerState, config: &ResolvedMcpConfig, ) -> Result<Self, ServerError>
Build the runtime from validated configuration.
The advertised server identity is this binary’s own name and version — self-reported, unverified, and used for nothing but display, exactly as the revision says such an identity must be.
§Errors
ServerError::Config when a published tool schema fails to compile.
Auto Trait Implementations§
impl !RefUnwindSafe for McpRuntime
impl !UnwindSafe for McpRuntime
impl Freeze for McpRuntime
impl Send for McpRuntime
impl Sync for McpRuntime
impl Unpin for McpRuntime
impl UnsafeUnpin for McpRuntime
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request