pub struct HttpTransport { /* private fields */ }Expand description
A streamable HTTP connection. Cheap to clone, and clones share it.
Implementations§
Source§impl HttpTransport
impl HttpTransport
Sourcepub fn new(options: HttpOptions) -> HttpTransport
pub fn new(options: HttpOptions) -> HttpTransport
A transport for options.
Sourcepub fn session_id(&self) -> Option<String>
pub fn session_id(&self) -> Option<String>
The session id the server assigned.
Sourcepub fn start(&self, events: Events) -> Result<(), McpError>
pub fn start(&self, events: Events) -> Result<(), McpError>
Begins delivering messages to events.
Sourcepub fn set_protocol_version(&self, version: &str)
pub fn set_protocol_version(&self, version: &str)
Sends MCP-Protocol-Version from now on.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HttpTransport
impl !UnwindSafe for HttpTransport
impl Freeze for HttpTransport
impl Send for HttpTransport
impl Sync for HttpTransport
impl Unpin for HttpTransport
impl UnsafeUnpin for HttpTransport
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