From 94b8b55ea6670e866a46056d477fe885027041b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Michel?= Date: Wed, 12 Jul 2023 11:57:02 +0000 Subject: [PATCH] refine transport trait --- transport/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/transport/src/lib.rs b/transport/src/lib.rs index 8bfe1d7..a837d05 100644 --- a/transport/src/lib.rs +++ b/transport/src/lib.rs @@ -11,9 +11,9 @@ type StreamId = u64; /// Trait representing a QUIC connection. pub trait Connection { /// The type produced by `poll_accept_bidi()` - type BidiStream: SendStream + RecvStream; + type BidiStream: BidiStream; /// The type of the sending part of `BidiStream` - type SendStream: SendStream; + type SendStream: SendStream + SendStreamUnframed; /// The type produced by `poll_accept_recv()` type RecvStream: RecvStream; @@ -52,9 +52,9 @@ pub trait Connection { /// Trait for opening outgoing streams pub trait OpenStreams { /// The type produced by `poll_open_bidi()` - type BidiStream: SendStream + RecvStream; + type BidiStream: BidiStream; /// The type produced by `poll_open_send()` - type SendStream: SendStream; + type SendStream: SendStream + SendStreamUnframed; /// The type of the receiving part of `BidiStream` type RecvStream: RecvStream; @@ -188,7 +188,7 @@ pub async fn send(send: &mut S, buf: &mut B) -> a /// Optional trait to allow "splitting" a bidirectional stream into two sides. pub trait BidiStream: SendStream + RecvStream { /// The type for the send half. - type SendStream: SendStream; + type SendStream: SendStream + SendStreamUnframed; /// The type for the receive half. type RecvStream: RecvStream;