pub struct NetworkSynchronousProxy { /* private fields */ }
Implementations§
source§impl NetworkSynchronousProxy
impl NetworkSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(&self, deadline: Time) -> Result<NetworkEvent, Error>
pub fn wait_for_event(&self, deadline: Time) -> Result<NetworkEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
sourcepub fn add_port(
&self,
port: ClientEnd<PortMarker>,
interface: ServerEnd<InterfaceMarker>
) -> Result<(), Error>
pub fn add_port( &self, port: ClientEnd<PortMarker>, interface: ServerEnd<InterfaceMarker> ) -> Result<(), Error>
Adds a port to the network.
- request
port
port to be added. - request
interface
provides control over the interface.
sourcepub fn get_config(&self, ___deadline: Time) -> Result<NetworkConfig, Error>
pub fn get_config(&self, ___deadline: Time) -> Result<NetworkConfig, Error>
Gets network configuration.
sourcepub fn set_config(
&self,
config: NetworkConfig,
___deadline: Time
) -> Result<i32, Error>
pub fn set_config( &self, config: NetworkConfig, ___deadline: Time ) -> Result<i32, Error>
Updates network configuration.
sourcepub fn attach_endpoint(
&self,
name: &str,
___deadline: Time
) -> Result<i32, Error>
pub fn attach_endpoint( &self, name: &str, ___deadline: Time ) -> Result<i32, Error>
Attaches endpoint with given name to network.
sourcepub fn remove_endpoint(
&self,
name: &str,
___deadline: Time
) -> Result<i32, Error>
pub fn remove_endpoint( &self, name: &str, ___deadline: Time ) -> Result<i32, Error>
Removes endpoint with given name from network.
sourcepub fn create_fake_endpoint(
&self,
ep: ServerEnd<FakeEndpointMarker>
) -> Result<(), Error>
pub fn create_fake_endpoint( &self, ep: ServerEnd<FakeEndpointMarker> ) -> Result<(), Error>
Injects a fake endpoint.