pub struct TransportConfig {
pub listen: String,
pub upstream: String,
pub protocol: Protocol,
pub connect_timeout_ms: u64,
pub request_timeout_ms: u64,
pub idle_timeout_ms: u64,
pub max_retries: u32,
pub max_body_size: usize,
}Expand description
Transport configuration
Fields§
§listen: StringListen address (e.g., “0.0.0.0:9443”)
upstream: StringUpstream server address (e.g., “mcp-server:8080”)
protocol: ProtocolProtocol type
connect_timeout_ms: u64Connection timeout in milliseconds
request_timeout_ms: u64Request timeout in milliseconds
idle_timeout_ms: u64Idle connection timeout in milliseconds
max_retries: u32Maximum number of retries for transient failures
max_body_size: usizeMaximum request body size in bytes
Implementations§
Source§impl TransportConfig
impl TransportConfig
Sourcepub fn connect_timeout(&self) -> Duration
pub fn connect_timeout(&self) -> Duration
Get connect timeout as Duration
Sourcepub fn request_timeout(&self) -> Duration
pub fn request_timeout(&self) -> Duration
Get request timeout as Duration
Sourcepub fn idle_timeout(&self) -> Duration
pub fn idle_timeout(&self) -> Duration
Get idle timeout as Duration
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§impl<'de> Deserialize<'de> for TransportConfig
impl<'de> Deserialize<'de> for TransportConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. 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> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
Attempts to downcast this to
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
Attempts to downcast this to
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
Attempts to downcast this to
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
Attempts to downcast this to
T behind Arc pointerSource§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