Expand description
Implements a simple mock network for testing purposes.
StructsΒ§
- Listener
Entry π - The
MockNetwork
βs view of a listener. - Mock
NetListener - A [
NetStreamListener
] implementation returned by aMockNetProvider
. - Mock
NetProvider - A view of a single hostβs access to a MockNetwork.
- Mock
NetProvider πInner - Shared part of a MockNetworkProvider.
- Mock
Network - A simulated Internet, for testing.
- Mock
TlsConnector - Mock TLS connector for use with MockNetProvider.
- Mock
TlsStream - Mock TLS connector for use with MockNetProvider.
- Mock
UdpSocket - A very poor imitation of a UDP socket
- Provider
Builder - A builder object used to configure a
MockNetProvider
EnumsΒ§
- Addr
Behavior π - A possible non-error behavior from an address
- Mock
NetError - Inner error type returned when a
MockNetwork
operation fails.
FunctionsΒ§
- err π
- Wrap
k
in a newstd::io::Error
.
Type AliasesΒ§
- Conn
Receiver π - A channel receiver that listeners use to receive incoming connections.
- Conn
Sender π - A channel sender that we use to send incoming connections to listeners.