@@ -31,7 +31,7 @@ pub trait ConnectedUdp {
31
31
type Error : embedded_io:: Error ;
32
32
33
33
/// Send the provided data to the connected peer
34
- fn send ( & mut self , data : & [ u8 ] ) -> Self :: SendFuture < ' _ > ;
34
+ fn send < ' a > ( & ' a mut self , data : & ' a [ u8 ] ) -> Self :: SendFuture < ' a > ;
35
35
/// Return type of the [`.send()`] method
36
36
type SendFuture < ' a > : Future < Output = Result < ( ) , Self :: Error > >
37
37
where
@@ -48,7 +48,7 @@ pub trait ConnectedUdp {
48
48
/// This deviates from the sync/nb equivalent trait in that it describes the overflow behavior
49
49
/// (a possibility not considered there). The name deviates from the original `receive()` to
50
50
/// make room for a version that is more zero-copy friendly.
51
- fn receive_into ( & mut self , buffer : & mut [ u8 ] ) -> Self :: ReceiveIntoFuture < ' _ > ;
51
+ fn receive_into < ' a > ( & ' a mut self , buffer : & ' a mut [ u8 ] ) -> Self :: ReceiveIntoFuture < ' a > ;
52
52
/// Return type of the [`.receive_into()`] method
53
53
type ReceiveIntoFuture < ' a > : Future < Output = Result < usize , Self :: Error > >
54
54
where
@@ -100,7 +100,12 @@ pub trait UnconnectedUdp {
100
100
/// receive time; these should be equal. This allows implementations of the trait to use a
101
101
/// single kind of socket for both sockets bound to a single and sockets bound to multiple
102
102
/// addresses.
103
- fn send ( & mut self , local : SocketAddr , remote : SocketAddr , data : & [ u8 ] ) -> Self :: SendFuture < ' _ > ;
103
+ fn send < ' a > (
104
+ & ' a mut self ,
105
+ local : SocketAddr ,
106
+ remote : SocketAddr ,
107
+ data : & ' a [ u8 ] ,
108
+ ) -> Self :: SendFuture < ' a > ;
104
109
/// Return type of the [`.send()`] method
105
110
type SendFuture < ' a > : Future < Output = Result < ( ) , Self :: Error > >
106
111
where
@@ -114,7 +119,7 @@ pub trait UnconnectedUdp {
114
119
///
115
120
/// The local and remote address are given, in that order, in the result along with the number
116
121
/// of bytes.
117
- fn receive_into ( & mut self , buffer : & mut [ u8 ] ) -> Self :: ReceiveIntoFuture < ' _ > ;
122
+ fn receive_into < ' a > ( & ' a mut self , buffer : & ' a mut [ u8 ] ) -> Self :: ReceiveIntoFuture < ' a > ;
118
123
/// Return type of the [`.receive_into()`] method
119
124
type ReceiveIntoFuture < ' a > : Future <
120
125
Output = Result < ( usize , SocketAddr , SocketAddr ) , Self :: Error > ,
0 commit comments