pub struct ServiceAreaBusiness { /* private fields */ }Expand description
A local service-area business record.
Implementations§
Source§impl ServiceAreaBusiness
impl ServiceAreaBusiness
Sourcepub fn new(
name: impl AsRef<str>,
kind: BusinessPresenceKind,
) -> Result<Self, LocalValueError>
pub fn new( name: impl AsRef<str>, kind: BusinessPresenceKind, ) -> Result<Self, LocalValueError>
Creates a local business descriptor.
§Errors
Returns LocalValueError::Empty when the business name is empty.
Sourcepub fn with_location(self, location: BusinessLocation) -> Self
pub fn with_location(self, location: BusinessLocation) -> Self
Sets a location label.
Sourcepub fn with_opening_hours(self, label: OpeningHoursLabel) -> Self
pub fn with_opening_hours(self, label: OpeningHoursLabel) -> Self
Sets an opening-hours label.
Sourcepub fn with_service_area_label(
self,
label: impl AsRef<str>,
) -> Result<Self, LocalValueError>
pub fn with_service_area_label( self, label: impl AsRef<str>, ) -> Result<Self, LocalValueError>
Sourcepub fn with_category(self, category: LocalCategory) -> Self
pub fn with_category(self, category: LocalCategory) -> Self
Adds a local category.
Sourcepub fn with_visibility_hint(self, hint: LocalVisibilityHint) -> Self
pub fn with_visibility_hint(self, hint: LocalVisibilityHint) -> Self
Adds a visibility hint.
Sourcepub const fn kind(&self) -> BusinessPresenceKind
pub const fn kind(&self) -> BusinessPresenceKind
Returns the presence kind.
Sourcepub const fn is_service_area_business(&self) -> bool
pub const fn is_service_area_business(&self) -> bool
Returns true when the business includes service-area behavior.
Sourcepub fn service_area_label(&self) -> Option<&str>
pub fn service_area_label(&self) -> Option<&str>
Returns the optional service-area label.
Sourcepub fn categories(&self) -> &[LocalCategory]
pub fn categories(&self) -> &[LocalCategory]
Returns local categories.
Sourcepub fn visibility_hints(&self) -> &[LocalVisibilityHint]
pub fn visibility_hints(&self) -> &[LocalVisibilityHint]
Returns visibility hints.
Trait Implementations§
Source§impl Clone for ServiceAreaBusiness
impl Clone for ServiceAreaBusiness
Source§fn clone(&self) -> ServiceAreaBusiness
fn clone(&self) -> ServiceAreaBusiness
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 ServiceAreaBusiness
impl Debug for ServiceAreaBusiness
Source§impl PartialEq for ServiceAreaBusiness
impl PartialEq for ServiceAreaBusiness
Source§fn eq(&self, other: &ServiceAreaBusiness) -> bool
fn eq(&self, other: &ServiceAreaBusiness) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ServiceAreaBusiness
impl StructuralPartialEq for ServiceAreaBusiness
Auto Trait Implementations§
impl Freeze for ServiceAreaBusiness
impl RefUnwindSafe for ServiceAreaBusiness
impl Send for ServiceAreaBusiness
impl Sync for ServiceAreaBusiness
impl Unpin for ServiceAreaBusiness
impl UnsafeUnpin for ServiceAreaBusiness
impl UnwindSafe for ServiceAreaBusiness
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