pub struct HttpStreamConfig {
pub base_url: Url,
pub timeout: Duration,
pub headers: HashMap<String, String>,
pub auth: Option<AuthConfig>,
pub compression: bool,
pub flow_control_window: u32,
}Expand description
Configuration for HTTP streaming transport.
This transport uses full-duplex HTTP streaming for bidirectional communication.
Fields§
§base_url: UrlBase URL for the MCP server
timeout: DurationTimeout for streaming operations
headers: HashMap<String, String>Additional HTTP headers to include
auth: Option<AuthConfig>Authentication configuration
compression: boolEnable compression for the stream
flow_control_window: u32Flow control window size
Implementations§
Source§impl HttpStreamConfig
impl HttpStreamConfig
Sourcepub fn header(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn header(self, key: impl Into<String>, value: impl Into<String>) -> Self
Add an HTTP header.
Sourcepub fn auth(self, auth: AuthConfig) -> Self
pub fn auth(self, auth: AuthConfig) -> Self
Set authentication configuration.
Sourcepub fn compression(self, enabled: bool) -> Self
pub fn compression(self, enabled: bool) -> Self
Enable or disable compression.
Sourcepub fn flow_control_window(self, size: u32) -> Self
pub fn flow_control_window(self, size: u32) -> Self
Set the flow control window size.
Trait Implementations§
Source§impl Clone for HttpStreamConfig
impl Clone for HttpStreamConfig
Source§fn clone(&self) -> HttpStreamConfig
fn clone(&self) -> HttpStreamConfig
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 HttpStreamConfig
impl Debug for HttpStreamConfig
Source§impl<'de> Deserialize<'de> for HttpStreamConfig
impl<'de> Deserialize<'de> for HttpStreamConfig
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
Source§impl PartialEq for HttpStreamConfig
impl PartialEq for HttpStreamConfig
Source§impl Serialize for HttpStreamConfig
impl Serialize for HttpStreamConfig
impl Eq for HttpStreamConfig
impl StructuralPartialEq for HttpStreamConfig
Auto Trait Implementations§
impl Freeze for HttpStreamConfig
impl RefUnwindSafe for HttpStreamConfig
impl Send for HttpStreamConfig
impl Sync for HttpStreamConfig
impl Unpin for HttpStreamConfig
impl UnwindSafe for HttpStreamConfig
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<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
Compare self to
key and return true if they are equal.