pub struct ServiceArea { /* private fields */ }Expand description
A named service area used for local discovery and targeting.
Implementations§
Source§impl ServiceArea
impl ServiceArea
Sourcepub fn with_region(self, region: GeoRegionCode) -> Self
pub fn with_region(self, region: GeoRegionCode) -> Self
Adds a region code to the area.
Sourcepub const fn with_radius(self, radius: LocationRadius) -> Self
pub const fn with_radius(self, radius: LocationRadius) -> Self
Sets the area radius.
Sourcepub fn regions(&self) -> &[GeoRegionCode]
pub fn regions(&self) -> &[GeoRegionCode]
Returns region codes assigned to the area.
Sourcepub const fn radius(&self) -> Option<LocationRadius>
pub const fn radius(&self) -> Option<LocationRadius>
Returns the optional radius.
Trait Implementations§
Source§impl Clone for ServiceArea
impl Clone for ServiceArea
Source§fn clone(&self) -> ServiceArea
fn clone(&self) -> ServiceArea
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ServiceArea
impl Debug for ServiceArea
Source§impl PartialEq for ServiceArea
impl PartialEq for ServiceArea
Source§fn eq(&self, other: &ServiceArea) -> bool
fn eq(&self, other: &ServiceArea) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ServiceArea
Auto Trait Implementations§
impl Freeze for ServiceArea
impl RefUnwindSafe for ServiceArea
impl Send for ServiceArea
impl Sync for ServiceArea
impl Unpin for ServiceArea
impl UnsafeUnpin for ServiceArea
impl UnwindSafe for ServiceArea
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