Skip to main content

Stream

Trait Stream 

Source
pub trait Stream: Read + Write { }
Expand description

Any bidirectional byte stream the HTTP client can run over. Box<dyn Stream> is itself Read + Write (via std’s impl<R: Read + ?Sized> Read for Box<R>), so an OWNED boxed stream can be handed to send_streaming by value — used by the long-lived MCP notification SSE reader.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Read + Write> Stream for T