pub struct ControlSynchronousProxy { /* private fields */ }Implementations§
Source§impl ControlSynchronousProxy
impl ControlSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ControlEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ControlEvent, 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_address(
&self,
address: &Subnet,
parameters: &AddressParameters,
address_state_provider: ServerEnd<AddressStateProviderMarker>,
) -> Result<(), Error>
pub fn add_address( &self, address: &Subnet, parameters: &AddressParameters, address_state_provider: ServerEnd<AddressStateProviderMarker>, ) -> Result<(), Error>
Assigns an address to the interface.
Errors are communicated via
[fuchsia.net.interfaces.admin/AddressStateProvider.OnAddressRemoved].
- request
addressthe address to assign to the interface. - request
parametersadditional address-specific options. - request
address_state_providerprovides address assignment state and enables updating address properties.
Sourcepub fn remove_address(
&self,
address: &Subnet,
___deadline: MonotonicInstant,
) -> Result<ControlRemoveAddressResult, Error>
pub fn remove_address( &self, address: &Subnet, ___deadline: MonotonicInstant, ) -> Result<ControlRemoveAddressResult, Error>
Removes an address from the interface.
- request
addressthe address to remove.
- response
did_removetrueiffaddresswas removed from the interface as a consequence of this call.
Sourcepub fn get_id(&self, ___deadline: MonotonicInstant) -> Result<u64, Error>
pub fn get_id(&self, ___deadline: MonotonicInstant) -> Result<u64, Error>
Gets the interface identifier.
- response
idthe interface identifier.
Sourcepub fn set_configuration(
&self,
config: &Configuration,
___deadline: MonotonicInstant,
) -> Result<ControlSetConfigurationResult, Error>
pub fn set_configuration( &self, config: &Configuration, ___deadline: MonotonicInstant, ) -> Result<ControlSetConfigurationResult, Error>
Sets the configuration for the interface.
Only set fields that are supported in the provided Configuration
will be set; unset fields will be left unmodified. The server will
return a Configuration which holds the previous configuration for
fields that the interface supports and set, even if the call did not
update the configuration’s value.
- request
configthe configuration fields to update on the interface.
- response
previous_configa snapshot of the interface’s previous configuration. Only supported fields present inconfigwill be set.
Sourcepub fn get_configuration(
&self,
___deadline: MonotonicInstant,
) -> Result<ControlGetConfigurationResult, Error>
pub fn get_configuration( &self, ___deadline: MonotonicInstant, ) -> Result<ControlGetConfigurationResult, Error>
Gets a snapshot of the interface’s configuration.
The server will populate the returned Configuration with the
configuration for features/protocols that the interface supports. That
is, fields for unsupported configurations will be unset in the returned
Configuration.
- response
configa snapshot of the interface’s configuration.
Sourcepub fn enable(
&self,
___deadline: MonotonicInstant,
) -> Result<ControlEnableResult, Error>
pub fn enable( &self, ___deadline: MonotonicInstant, ) -> Result<ControlEnableResult, Error>
Enables the interface.
- response
did_enabletrueiff the interface moved from disabled to enabled as a consequence of this call.
Sourcepub fn disable(
&self,
___deadline: MonotonicInstant,
) -> Result<ControlDisableResult, Error>
pub fn disable( &self, ___deadline: MonotonicInstant, ) -> Result<ControlDisableResult, Error>
Disables the interface.
- response
did_disabletrueiff the interface moved from enabled to disabled as a consequence of this call.
Sourcepub fn detach(&self) -> Result<(), Error>
pub fn detach(&self) -> Result<(), Error>
Detaches the client end from the interface’s lifetime.
After calling Detach, closing this client end no longer causes the
interface to be removed.
Get an authentication credential for this interface.
The credential contains a [zx::handle::EVENT], whose entangled
partner is held by the server. This credential can be converted into a
[fuchsia.net.resources/ProofOfInterfaceAuthorization] and then passed
into fuchsia.net.* API calls to prove ownership of this interface. The
EVENT is stable throughout the lifetime of the interface. Clients may
duplicate this EVENT to make multiple API calls, or transfer the
EVENT to other clients.
- response
credentialthe authorization credential for this interface.
Sourcepub fn remove(
&self,
___deadline: MonotonicInstant,
) -> Result<ControlRemoveResult, Error>
pub fn remove( &self, ___deadline: MonotonicInstant, ) -> Result<ControlRemoveResult, Error>
Initiates interface removal.
This method returns success once interface removal has started. When the
interface is removed, a USER removed reason is issued in
[OnInterfaceRemoved] and the server end is closed.
Trait Implementations§
Source§impl Debug for ControlSynchronousProxy
impl Debug for ControlSynchronousProxy
Source§impl From<Channel> for ControlSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for ControlSynchronousProxy
Source§impl From<ControlSynchronousProxy> for Handle
Available on Fuchsia only.
impl From<ControlSynchronousProxy> for Handle
Source§fn from(value: ControlSynchronousProxy) -> Self
fn from(value: ControlSynchronousProxy) -> Self
Source§impl FromClient for ControlSynchronousProxy
Available on Fuchsia only.
impl FromClient for ControlSynchronousProxy
Source§type Protocol = ControlMarker
type Protocol = ControlMarker
Source§fn from_client(value: ClientEnd<ControlMarker>) -> Self
fn from_client(value: ClientEnd<ControlMarker>) -> Self
Source§impl SynchronousProxy for ControlSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for ControlSynchronousProxy
Source§type Proxy = ControlProxy
type Proxy = ControlProxy
Source§type Protocol = ControlMarker
type Protocol = ControlMarker
Proxy controls.