File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,14 @@ pub trait FramedRead {
11
11
fn read < ' a > (
12
12
& ' a mut self ,
13
13
buf : & ' a mut BytesMut ,
14
- ) -> Pin < Box < dyn std:: future:: Future < Output = io:: Result < usize > > + ' a > >
14
+ ) -> Pin < Box < dyn std:: future:: Future < Output = io:: Result < usize > > + ' a + Send > >
15
15
where
16
16
Self : ' a ;
17
17
}
18
18
19
19
pub trait FramedWrite {
20
20
/// Writes an entire buffer into this stream.
21
- fn write_all < ' a > ( & ' a mut self , buf : & ' a [ u8 ] ) -> Pin < Box < dyn std:: future:: Future < Output = io:: Result < ( ) > > + ' a > >
21
+ fn write_all < ' a > ( & ' a mut self , buf : & ' a [ u8 ] ) -> Pin < Box < dyn std:: future:: Future < Output = io:: Result < ( ) > > + ' a + Send > >
22
22
where
23
23
Self : ' a ;
24
24
}
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ impl<S> FramedWrite for FuturesStream<S>
61
61
where
62
62
S : Unpin + AsyncWrite ,
63
63
{
64
- fn write_all < ' a > ( & ' a mut self , buf : & ' a [ u8 ] ) -> Pin < Box < dyn std:: future:: Future < Output = io:: Result < ( ) > > + ' a > >
64
+ fn write_all < ' a > ( & ' a mut self , buf : & ' a [ u8 ] ) -> Pin < Box < dyn std:: future:: Future < Output = io:: Result < ( ) > > + ' a + Send > >
65
65
where
66
66
Self : ' a ,
67
67
{
Original file line number Diff line number Diff line change @@ -282,7 +282,7 @@ pub fn find_size(bytes: &[u8]) -> PduResult<Option<PduInfo>> {
282
282
}
283
283
}
284
284
285
- pub trait PduHint : core:: fmt:: Debug {
285
+ pub trait PduHint : core:: fmt:: Debug + Sync {
286
286
/// Finds next PDU size by reading the next few bytes.
287
287
fn find_size ( & self , bytes : & [ u8 ] ) -> PduResult < Option < usize > > ;
288
288
}
Original file line number Diff line number Diff line change @@ -33,14 +33,14 @@ impl<S> StreamWrapper for TokioStream<S> {
33
33
34
34
impl < S > FramedRead for TokioStream < S >
35
35
where
36
- S : Unpin + AsyncRead ,
36
+ S : Unpin + AsyncRead + Send ,
37
37
{
38
38
fn read < ' a > (
39
39
& ' a mut self ,
40
40
buf : & ' a mut BytesMut ,
41
- ) -> Pin < Box < dyn std:: future:: Future < Output = io:: Result < usize > > + ' a > >
41
+ ) -> Pin < Box < dyn std:: future:: Future < Output = io:: Result < usize > > + ' a + Send > >
42
42
where
43
- Self : ' a ,
43
+ Self : ' a + Send ,
44
44
{
45
45
use tokio:: io:: AsyncReadExt as _;
46
46
50
50
51
51
impl < S > FramedWrite for TokioStream < S >
52
52
where
53
- S : Unpin + AsyncWrite ,
53
+ S : Unpin + AsyncWrite + Send ,
54
54
{
55
- fn write_all < ' a > ( & ' a mut self , buf : & ' a [ u8 ] ) -> Pin < Box < dyn std:: future:: Future < Output = io:: Result < ( ) > > + ' a > >
55
+ fn write_all < ' a > ( & ' a mut self , buf : & ' a [ u8 ] ) -> Pin < Box < dyn std:: future:: Future < Output = io:: Result < ( ) > > + ' a + Send > >
56
56
where
57
57
Self : ' a ,
58
58
{
You can’t perform that action at this time.
0 commit comments