#[non_exhaustive]pub struct McpServerHttp {
pub name: String,
pub url: String,
pub headers: Vec<HttpHeader>,
pub meta: Option<Map<String, Value>>,
}unstable_protocol_v2 only.Expand description
HTTP transport configuration for MCP.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringHuman-readable name identifying this MCP server.
url: StringURL to the MCP server.
headers: Vec<HttpHeader>HTTP headers to set when making requests to the MCP server.
meta: Option<Map<String, Value>>The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Implementations§
Source§impl McpServerHttp
impl McpServerHttp
Sourcepub fn new(name: impl Into<String>, url: impl Into<String>) -> McpServerHttp
pub fn new(name: impl Into<String>, url: impl Into<String>) -> McpServerHttp
Builds McpServerHttp with the required fields set; optional fields start unset or empty.
Sourcepub fn headers(self, headers: Vec<HttpHeader>) -> McpServerHttp
pub fn headers(self, headers: Vec<HttpHeader>) -> McpServerHttp
HTTP headers to set when making requests to the MCP server.
Sourcepub fn meta(self, meta: impl IntoOption<Map<String, Value>>) -> McpServerHttp
pub fn meta(self, meta: impl IntoOption<Map<String, Value>>) -> McpServerHttp
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Trait Implementations§
Source§impl Clone for McpServerHttp
impl Clone for McpServerHttp
Source§fn clone(&self) -> McpServerHttp
fn clone(&self) -> McpServerHttp
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for McpServerHttp
impl Debug for McpServerHttp
Source§impl<'de> Deserialize<'de> for McpServerHttp
impl<'de> Deserialize<'de> for McpServerHttp
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<McpServerHttp, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<McpServerHttp, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for McpServerHttp
Source§impl IntoV1 for McpServerHttp
impl IntoV1 for McpServerHttp
Source§type Output = McpServerHttp
type Output = McpServerHttp
Source§fn into_v1(
self,
) -> Result<<McpServerHttp as IntoV1>::Output, ProtocolConversionError>
fn into_v1( self, ) -> Result<<McpServerHttp as IntoV1>::Output, ProtocolConversionError>
Source§impl JsonSchema for McpServerHttp
impl JsonSchema for McpServerHttp
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for McpServerHttp
impl PartialEq for McpServerHttp
Source§fn eq(&self, other: &McpServerHttp) -> bool
fn eq(&self, other: &McpServerHttp) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for McpServerHttp
impl Serialize for McpServerHttp
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for McpServerHttp
Auto Trait Implementations§
impl Freeze for McpServerHttp
impl RefUnwindSafe for McpServerHttp
impl Send for McpServerHttp
impl Sync for McpServerHttp
impl Unpin for McpServerHttp
impl UnsafeUnpin for McpServerHttp
impl UnwindSafe for McpServerHttp
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.