1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#![cfg_attr(not(test), no_std)]
#![deny(unsafe_code)]
pub mod tcp;
pub mod dns;
pub mod addr;
use tcp::TcpStack;
use core::fmt::Debug;
use crate::tcp::TcpError;
use crate::dns::{DnsError, Dns};
pub trait IpNetworkDriver {
type TcpSocket;
type TcpError: Into<TcpError> + Debug;
type DnsError: Into<DnsError> + Debug;
fn tcp(&self) -> &dyn TcpStack<TcpSocket=Self::TcpSocket, Error=Self::TcpError>;
fn dns(&self) -> &dyn Dns<Error=Self::DnsError>;
}