pub struct DeviceRouteSynchronousProxy { /* private fields */ }
Implementations§
Source§impl DeviceRouteSynchronousProxy
impl DeviceRouteSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<DeviceRouteEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<DeviceRouteEvent, 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 register_on_mesh_prefix(
&self,
prefix: &OnMeshPrefix,
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn register_on_mesh_prefix( &self, prefix: &OnMeshPrefix, ___deadline: MonotonicInstant, ) -> Result<(), Error>
Registers an on-mesh prefix to be advertised on the current network.
Subsequent calls with the same value for the subnet
field will
update the properties associated with that on-mesh prefix.
These changes persist like adding an IP address would, and will stick around until explicitly removed or the interface component is reset/restarted.
If the given OnMeshPrefix
structure is invalid for some reason
(missing required fields, invalid values, etc), the channel will be
closed with the epitaph ZX_ERR_INVALID_ARGS
.
If registering a new on-mesh prefix and the maximum number of
on-mesh prefixes has already been registered, this channel will
be closed with the epitaph ZX_ERR_NO_RESOURCES
.
Sourcepub fn unregister_on_mesh_prefix(
&self,
subnet: &Ipv6AddressWithPrefix,
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn unregister_on_mesh_prefix( &self, subnet: &Ipv6AddressWithPrefix, ___deadline: MonotonicInstant, ) -> Result<(), Error>
Unregisters any on-mesh prefix that was previously registered with
RegisterOnMeshPrefix
. It returns once the on-mesh prefix has
been removed locally.
If the given mesh prefix was not previously registered, no action is taken.
Sourcepub fn register_external_route(
&self,
external_route: &ExternalRoute,
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn register_external_route( &self, external_route: &ExternalRoute, ___deadline: MonotonicInstant, ) -> Result<(), Error>
Registers an external route to be advertised on the current network.
Subsequent calls with the same value for the subnet
field will
update the properties associated with that route.
These changes persist like adding an IP address would, and will stick around until explicitly removed or the interface component is reset/restarted.
If the given ExternalRoute
structure is invalid for some reason
(missing required fields, invalid values, etc), the channel will be
closed with the epitaph ZX_ERR_INVALID_ARGUMENT
.
If registering a new external route and the maximum number of
external routes has already been registered, this channel will
be closed with the epitaph ZX_ERR_NO_RESOURCES
.
Sourcepub fn unregister_external_route(
&self,
subnet: &Ipv6AddressWithPrefix,
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn unregister_external_route( &self, subnet: &Ipv6AddressWithPrefix, ___deadline: MonotonicInstant, ) -> Result<(), Error>
Unregisters any external route that was previously registered with
RegisterExternalRoute
. It returns once the external route has
been removed locally.
If the given external route was not previously registered, no action is taken.
Trait Implementations§
Source§impl Debug for DeviceRouteSynchronousProxy
impl Debug for DeviceRouteSynchronousProxy
Source§impl SynchronousProxy for DeviceRouteSynchronousProxy
impl SynchronousProxy for DeviceRouteSynchronousProxy
Source§type Proxy = DeviceRouteProxy
type Proxy = DeviceRouteProxy
Source§type Protocol = DeviceRouteMarker
type Protocol = DeviceRouteMarker
Proxy
controls.