pub enum TransportConfig {
Stdio,
Http {
port: u16,
host: Option<String>,
},
StreamableHttp {
port: u16,
host: Option<String>,
},
WebSocket {
port: u16,
host: Option<String>,
},
}
Expand description
Transport configuration
Variants§
Stdio
Standard I/O transport (for MCP clients)
Http
HTTP transport with Server-Sent Events
StreamableHttp
Streamable HTTP transport (MCP Inspector compatible)
WebSocket
WebSocket transport
Implementations§
Source§impl TransportConfig
impl TransportConfig
Sourcepub fn stdio() -> TransportConfig
pub fn stdio() -> TransportConfig
Create stdio transport configuration
Sourcepub fn http(port: u16) -> TransportConfig
pub fn http(port: u16) -> TransportConfig
Create HTTP transport configuration
Sourcepub fn streamable_http(port: u16) -> TransportConfig
pub fn streamable_http(port: u16) -> TransportConfig
Create Streamable HTTP transport configuration (MCP Inspector compatible)
Sourcepub fn websocket(port: u16) -> TransportConfig
pub fn websocket(port: u16) -> TransportConfig
Create WebSocket transport configuration
Trait Implementations§
Source§impl Clone for TransportConfig
impl Clone for TransportConfig
Source§fn clone(&self) -> TransportConfig
fn clone(&self) -> TransportConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TransportConfig
impl Debug for TransportConfig
Source§impl Default for TransportConfig
impl Default for TransportConfig
Source§fn default() -> TransportConfig
fn default() -> TransportConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TransportConfig
impl<'de> Deserialize<'de> for TransportConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TransportConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TransportConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for TransportConfig
impl Serialize for TransportConfig
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,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for TransportConfig
impl RefUnwindSafe for TransportConfig
impl Send for TransportConfig
impl Sync for TransportConfig
impl Unpin for TransportConfig
impl UnwindSafe for TransportConfig
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,
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>
Converts
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>
Converts
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