Struct tor_rtmock::net::MockNetwork [−][src]
pub struct MockNetwork { /* fields omitted */ }Expand description
A simulated Internet, for testing.
We simulate TCP streams only, and skip all the details. Connection
are implemented using LocalStream. The MockNetwork object is
shared by a large set of MockNetworkProviders, each of which has
its own view of its address(es) on the network.
Implementations
Return a ProviderBuilder for creating a MockNetProvider
Examples
let client_net = mock_network.builder() .add_address("198.51.100.6".parse().unwrap()) .add_address("2001:db8::7".parse().unwrap()) .provider();
Auto Trait Implementations
impl RefUnwindSafe for MockNetworkimpl Send for MockNetworkimpl Sync for MockNetworkimpl Unpin for MockNetworkimpl UnwindSafe for MockNetwork