pub struct NetworkProxy { /* private fields */ }
Implementations§
source§impl NetworkProxy
impl NetworkProxy
sourcepub fn take_event_stream(&self) -> NetworkEventStream
pub fn take_event_stream(&self) -> NetworkEventStream
Get a Stream of events from the remote end of the Network protocol
Panics
Panics if the event stream was already taken.
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) -> QueryResponseFut<NetworkConfig>
pub fn get_config(&self) -> QueryResponseFut<NetworkConfig>
Gets network configuration.
sourcepub fn set_config(&self, config: NetworkConfig) -> QueryResponseFut<i32>
pub fn set_config(&self, config: NetworkConfig) -> QueryResponseFut<i32>
Updates network configuration.
sourcepub fn attach_endpoint(&self, name: &str) -> QueryResponseFut<i32>
pub fn attach_endpoint(&self, name: &str) -> QueryResponseFut<i32>
Attaches endpoint with given name to network.
sourcepub fn remove_endpoint(&self, name: &str) -> QueryResponseFut<i32>
pub fn remove_endpoint(&self, name: &str) -> QueryResponseFut<i32>
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.
Trait Implementations§
source§impl Clone for NetworkProxy
impl Clone for NetworkProxy
source§fn clone(&self) -> NetworkProxy
fn clone(&self) -> NetworkProxy
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NetworkProxy
impl Debug for NetworkProxy
source§impl NetworkProxyInterface for NetworkProxy
impl NetworkProxyInterface for NetworkProxy
fn add_port( &self, port: ClientEnd<PortMarker>, interface: ServerEnd<InterfaceMarker> ) -> Result<(), Error>
type GetConfigResponseFut = QueryResponseFut<NetworkConfig>
fn get_config(&self) -> Self::GetConfigResponseFut
type GetNameResponseFut = QueryResponseFut<String>
fn get_name(&self) -> Self::GetNameResponseFut
type SetConfigResponseFut = QueryResponseFut<i32>
fn set_config(&self, config: NetworkConfig) -> Self::SetConfigResponseFut
type AttachEndpointResponseFut = QueryResponseFut<i32>
fn attach_endpoint(&self, name: &str) -> Self::AttachEndpointResponseFut
type RemoveEndpointResponseFut = QueryResponseFut<i32>
fn remove_endpoint(&self, name: &str) -> Self::RemoveEndpointResponseFut
fn create_fake_endpoint( &self, ep: ServerEnd<FakeEndpointMarker> ) -> Result<(), Error>
source§impl Proxy for NetworkProxy
impl Proxy for NetworkProxy
§type Protocol = NetworkMarker
type Protocol = NetworkMarker
The protocol which this
Proxy
controls.source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Create a proxy over the given channel.
source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Attempt to convert the proxy back into a channel. Read more
source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Get a reference to the proxy’s underlying channel. Read more