pub struct HyperServerConfig { /* private fields */ }Expand description
Hyper server configuration
Configuration for HTTP/SSE/Hybrid MCP servers using the Builder pattern.
§Example
use crates_docs::server::transport::HyperServerConfig;
let http_config = HyperServerConfig::http();
let sse_config = HyperServerConfig::sse();
let hybrid_config = HyperServerConfig::hybrid();Implementations§
Source§impl HyperServerConfig
impl HyperServerConfig
Sourcepub fn http() -> Self
pub fn http() -> Self
Create HTTP server configuration
HTTP mode supports Streamable HTTP protocol for stateless requests.
Sourcepub fn sse() -> Self
pub fn sse() -> Self
Create SSE server configuration
SSE mode supports Server-Sent Events for server push capabilities.
Sourcepub fn hybrid() -> Self
pub fn hybrid() -> Self
Create Hybrid server configuration
Hybrid mode supports both HTTP and SSE protocols.
Sourcepub fn protocol_name(&self) -> &str
pub fn protocol_name(&self) -> &str
Get protocol name
Sourcepub fn sse_support(&self) -> bool
pub fn sse_support(&self) -> bool
Check if SSE support is enabled
Trait Implementations§
Source§impl Clone for HyperServerConfig
impl Clone for HyperServerConfig
Source§fn clone(&self) -> HyperServerConfig
fn clone(&self) -> HyperServerConfig
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 moreAuto Trait Implementations§
impl Freeze for HyperServerConfig
impl RefUnwindSafe for HyperServerConfig
impl Send for HyperServerConfig
impl Sync for HyperServerConfig
impl Unpin for HyperServerConfig
impl UnsafeUnpin for HyperServerConfig
impl UnwindSafe for HyperServerConfig
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