#[non_exhaustive]pub enum McpStreamableHttpPostResponse {
Accepted,
Json(JsonRpcMessage<ServerRequest, ServerResult, ServerNotification>, Option<String>),
Sse(Pin<Box<dyn Stream<Item = Result<Sse, Error>> + Send>>, Option<String>),
}Expand description
Re-exports of the rmcp Streamable HTTP transport types used by
McpHttpClient implementations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Accepted
Json(JsonRpcMessage<ServerRequest, ServerResult, ServerNotification>, Option<String>)
Sse(Pin<Box<dyn Stream<Item = Result<Sse, Error>> + Send>>, Option<String>)
Implementations§
Source§impl StreamableHttpPostResponse
impl StreamableHttpPostResponse
pub async fn expect_initialized<E>( self, ) -> Result<(JsonRpcMessage<ServerRequest, ServerResult, ServerNotification>, Option<String>), StreamableHttpError<E>>
pub fn expect_json<E>( self, ) -> Result<JsonRpcMessage<ServerRequest, ServerResult, ServerNotification>, StreamableHttpError<E>>
pub fn expect_accepted_or_json<E>(self) -> Result<(), StreamableHttpError<E>>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for StreamableHttpPostResponse
impl !Sync for StreamableHttpPostResponse
impl !UnwindSafe for StreamableHttpPostResponse
impl Freeze for StreamableHttpPostResponse
impl Send for StreamableHttpPostResponse
impl Unpin for StreamableHttpPostResponse
impl UnsafeUnpin for StreamableHttpPostResponse
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