@@ -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 > > where Self : ' a ;
37
37
@@ -46,7 +46,7 @@ pub trait ConnectedUdp {
46
46
/// This deviates from the sync/nb equivalent trait in that it describes the overflow behavior
47
47
/// (a possibility not considered there). The name deviates from the original `receive()` to
48
48
/// make room for a version that is more zero-copy friendly.
49
- fn receive_into ( & mut self , buffer : & mut [ u8 ] ) -> Self :: ReceiveIntoFuture < ' _ > ;
49
+ fn receive_into < ' a > ( & ' a mut self , buffer : & ' a mut [ u8 ] ) -> Self :: ReceiveIntoFuture < ' a > ;
50
50
/// Return type of the [`.receive_into()`] method
51
51
type ReceiveIntoFuture < ' a > : Future < Output = Result < usize , Self :: Error > > where Self : ' a ;
52
52
@@ -96,7 +96,7 @@ pub trait UnconnectedUdp {
96
96
/// receive time; these should be equal. This allows implementations of the trait to use a
97
97
/// single kind of socket for both sockets bound to a single and sockets bound to multiple
98
98
/// addresses.
99
- fn send ( & mut self , local : SocketAddr , remote : SocketAddr , data : & [ u8 ] ) -> Self :: SendFuture < ' _ > ;
99
+ fn send < ' a > ( & ' a mut self , local : SocketAddr , remote : SocketAddr , data : & ' a [ u8 ] ) -> Self :: SendFuture < ' a > ;
100
100
/// Return type of the [`.send()`] method
101
101
type SendFuture < ' a > : Future < Output = Result < ( ) , Self :: Error > > where Self : ' a ;
102
102
@@ -108,7 +108,7 @@ pub trait UnconnectedUdp {
108
108
///
109
109
/// The local and remote address are given, in that order, in the result along with the number
110
110
/// of bytes.
111
- fn receive_into ( & mut self , buffer : & mut [ u8 ] ) -> Self :: ReceiveIntoFuture < ' _ > ;
111
+ fn receive_into < ' a > ( & ' a mut self , buffer : & ' a mut [ u8 ] ) -> Self :: ReceiveIntoFuture < ' a > ;
112
112
/// Return type of the [`.receive_into()`] method
113
113
type ReceiveIntoFuture < ' a > : Future < Output = Result < ( usize , SocketAddr , SocketAddr ) , Self :: Error > > where Self : ' a ;
114
114
}
0 commit comments