pub struct Mcp;Expand description
JSON request/response binding for runtime-selected MCP capabilities.
Trait Implementations§
Source§impl ChannelContract for Mcp
impl ChannelContract for Mcp
const TRANSPORT: Transport = pb::Transport::Mcp
type Input = Value
type Output = Value
type StatusResponse = Value
type CancelResponse = Value
fn validate_companion( contract: &ContractDescriptor, _status: bool, ) -> Result<()>
fn validate_input(request: &Value) -> Result<()>
async fn invoke(channel: Channel<Self>, request: Value) -> Result<Value>
fn execution(response: &Value) -> Result<(bool, String)>
async fn status(channel: Channel<Self>) -> Result<Value>
async fn cancel(channel: Channel<Self>) -> Result<Value>
fn status_state(response: &Value) -> Result<&str>
Source§const ID: &'static str = ""
const ID: &'static str = ""
Contract ID fixed by the binding; empty when selected at connection time.
const MODE: &'static str = "rpc"
const SERVICE: &'static str = ""
const METHOD: &'static str = ""
const IDL: &'static str = ""
fn matches_contract(contract: &ContractDescriptor) -> bool
Auto Trait Implementations§
impl Freeze for Mcp
impl RefUnwindSafe for Mcp
impl Send for Mcp
impl Sync for Mcp
impl Unpin for Mcp
impl UnsafeUnpin for Mcp
impl UnwindSafe for Mcp
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].