pub trait ContentStream {
// Required method
fn next(
&self,
) -> Pin<Box<dyn Future<Output = Result<Option<Rc<dyn Content>>, ContentError>> + '_>>;
// Provided method
fn produced(&self) -> Option<usize> { ... }
}Expand description
Re-export framework services (HTTP, URI, etc.) from the dedicated services crate. An asynchronous stream of content.
next resolves once the next item is available; the
producer wakes the pending future, so collectors never poll.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".