aboutsummaryrefslogtreecommitdiff
path: root/src/send.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/send.rs')
-rw-r--r--src/send.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/send.rs b/src/send.rs
index 287fe40..c40787f 100644
--- a/src/send.rs
+++ b/src/send.rs
@@ -4,7 +4,7 @@ use std::sync::Arc;
use std::task::{Context, Poll};
use async_trait::async_trait;
-use bytes::{Bytes, BytesMut, BufMut};
+use bytes::{BufMut, Bytes, BytesMut};
use log::*;
use futures::AsyncWriteExt;
@@ -36,6 +36,8 @@ pub(crate) const ERROR_MARKER: ChunkLength = 0x4000;
pub(crate) const CHUNK_HAS_CONTINUATION: ChunkLength = 0x8000;
pub(crate) const CHUNK_LENGTH_MASK: ChunkLength = 0x3FFF;
+pub(crate) type SendStream = (RequestID, RequestPriority, ByteStream);
+
struct SendQueue {
items: Vec<(u8, VecDeque<SendQueueItem>)>,
}
@@ -184,7 +186,7 @@ impl DataFrame {
pub(crate) trait SendLoop: Sync {
async fn send_loop<W>(
self: Arc<Self>,
- msg_recv: mpsc::UnboundedReceiver<(RequestID, RequestPriority, ByteStream)>,
+ msg_recv: mpsc::UnboundedReceiver<SendStream>,
mut write: BoxStreamWrite<W>,
) -> Result<(), Error>
where