use std::pin::Pin; use std::task::{Context, Poll}; trait Stream { type Item; fn poll_next( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll>; } // ANCHOR: here trait StreamExt: Stream { async fn next(&mut self) -> Option where Self: Unpin; // other methods... } // ANCHOR_END: here