pub enum RegulatoryRegionConfiguratorRequest {
SetRegion {
region: String,
control_handle: RegulatoryRegionConfiguratorControlHandle,
},
}
Expand description
The RegulatoryRegionConfigurator protocol provides mechanisms to inform Location Services of the inputs that should be used to determine the regulatory region whose rules should govern the operation of radios on the system.
Variants§
SetRegion
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);
service.SetRegion("AA");
service.SetRegion("BB");
- request
region
the current regulatory region.
Implementations§
Source§impl RegulatoryRegionConfiguratorRequest
impl RegulatoryRegionConfiguratorRequest
pub fn into_set_region( self, ) -> Option<(String, RegulatoryRegionConfiguratorControlHandle)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RegulatoryRegionConfiguratorRequest
impl !RefUnwindSafe for RegulatoryRegionConfiguratorRequest
impl Send for RegulatoryRegionConfiguratorRequest
impl Sync for RegulatoryRegionConfiguratorRequest
impl Unpin for RegulatoryRegionConfiguratorRequest
impl !UnwindSafe for RegulatoryRegionConfiguratorRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more