core/muxer: Deprecate StreamMuxerExt::next_{inbound,outbound} (#3002)

This commit is contained in:
Thomas Eizinger
2022-10-12 23:36:39 +11:00
committed by GitHub
parent eba2efe29a
commit f711dd5ce0
5 changed files with 47 additions and 9 deletions

View File

@@ -160,11 +160,19 @@ pub trait StreamMuxerExt: StreamMuxer + Sized {
}
/// Returns a future that resolves to the next inbound `Substream` opened by the remote.
#[deprecated(
since = "0.37.0",
note = "This future violates the `StreamMuxer` contract because it doesn't call `StreamMuxer::poll`."
)]
fn next_inbound(&mut self) -> NextInbound<'_, Self> {
NextInbound(self)
}
/// Returns a future that opens a new outbound `Substream` with the remote.
#[deprecated(
since = "0.37.0",
note = "This future violates the `StreamMuxer` contract because it doesn't call `StreamMuxer::poll`."
)]
fn next_outbound(&mut self) -> NextOutbound<'_, Self> {
NextOutbound(self)
}