pub struct RegulatoryRegionConfiguratorSynchronousProxy { /* private fields */ }
Implementations§
source§impl RegulatoryRegionConfiguratorSynchronousProxy
impl RegulatoryRegionConfiguratorSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(
&self,
deadline: Time
) -> Result<RegulatoryRegionConfiguratorEvent, Error>
pub fn wait_for_event( &self, deadline: Time ) -> Result<RegulatoryRegionConfiguratorEvent, 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 set_region(&self, region: &str) -> Result<(), Error>
pub fn set_region(&self, region: &str) -> Result<(), Error>
Sets the region.
Clients should take care that their calls to this API arrive in a well-defined order. For example, when using Zircon channels as the underlying transport, the code below may not behave as intended.
// DANGER: The service may receive "BB" before "AA".
service1 = Open(RegulatoryRegionConfigurator);
service1.SetRegion("AA");
service1.Close();
service2 = Open(RegulatoryRegionConfigurator);
service2.SetRegion("BB");
service2.Close();
A client can avoid this problem by holding a single channel open to the service, for the lifetime of the client.
// We use a single channel to ensure that calls arrive in a
// well-defined order.
service = Open(RegulatoryRegionConfigurator);
service1.SetRegion("AA");
service2.SetRegion("BB");
- request
region
the current regulatory region.