Struct ServiceArea
pub struct ServiceArea { /* private fields */ }Expand description
A named service area used for local discovery and targeting.
Implementations§
§impl ServiceArea
impl ServiceArea
pub fn new(label: impl AsRef<str>) -> Result<ServiceArea, GeoValueError>
pub fn new(label: impl AsRef<str>) -> Result<ServiceArea, GeoValueError>
pub fn with_region(self, region: GeoRegionCode) -> ServiceArea
pub fn with_region(self, region: GeoRegionCode) -> ServiceArea
Adds a region code to the area.
pub const fn with_radius(self, radius: LocationRadius) -> ServiceArea
pub const fn with_radius(self, radius: LocationRadius) -> ServiceArea
Sets the area radius.
pub fn regions(&self) -> &[GeoRegionCode]
pub fn regions(&self) -> &[GeoRegionCode]
Returns region codes assigned to the area.
pub const fn radius(&self) -> Option<LocationRadius>
pub const fn radius(&self) -> Option<LocationRadius>
Returns the optional radius.
Trait Implementations§
§impl Clone for ServiceArea
impl Clone for ServiceArea
§fn clone(&self) -> ServiceArea
fn clone(&self) -> ServiceArea
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for ServiceArea
impl Debug for ServiceArea
§impl PartialEq for ServiceArea
impl PartialEq for ServiceArea
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