Skip to content

Commit 9b2dc8d

Browse files
author
Ulf Lilleengen
committed
Rename and specify error type
1 parent c964055 commit 9b2dc8d

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

embedded-nal-async/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ pub use no_std_net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, Socke
1414

1515
pub use dns::Dns;
1616
pub use embedded_nal::AddrType;
17-
pub use stack::{TcpClientStack, TcpConnector, TcpFullStack, UdpClientStack, UdpFullStack};
17+
pub use stack::{TcpClientStack, TcpConnect, TcpFullStack, UdpClientStack, UdpFullStack};

embedded-nal-async/src/stack/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mod tcp;
22
mod udp;
33

4-
pub use tcp::{TcpClientStack, TcpConnector, TcpFullStack};
4+
pub use tcp::{TcpClientStack, TcpConnect, TcpFullStack};
55
pub use udp::{UdpClientStack, UdpFullStack};

embedded-nal-async/src/stack/tcp.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,10 @@ impl<T: TcpClientStack> TcpClientStack for &mut T {
173173

174174
/// This trait is implemented by TCP/IP stacks. In contrast to the TcpClientStack trait,
175175
/// this trait allows creating multiple connections using the same TCP/IP stack.
176-
pub trait TcpConnector: embedded_io::Io {
176+
pub trait TcpConnect {
177+
/// Error type returned on connect failure.
178+
type Error;
179+
177180
/// Type holding state of a TCP connection.
178181
type Connection<'m>: embedded_io::asynch::Read + embedded_io::asynch::Write
179182
where

0 commit comments

Comments
 (0)