pub struct LocalBusiness { /* private fields */ }Expand description
Local business primitive.
Implementations§
Source§impl LocalBusiness
impl LocalBusiness
Sourcepub fn new(
name: impl AsRef<str>,
address: PostalAddress,
) -> Result<Self, SchemaValueError>
pub fn new( name: impl AsRef<str>, address: PostalAddress, ) -> Result<Self, SchemaValueError>
Sourcepub fn with_category(
self,
category: impl AsRef<str>,
) -> Result<Self, SchemaValueError>
pub fn with_category( self, category: impl AsRef<str>, ) -> Result<Self, SchemaValueError>
Sourcepub fn with_opening_hours(self, hours: OpeningHoursSpecification) -> Self
pub fn with_opening_hours(self, hours: OpeningHoursSpecification) -> Self
Adds opening-hours specification.
Sourcepub const fn schema_type(&self) -> &'static str
pub const fn schema_type(&self) -> &'static str
Returns the schema-like type label.
Trait Implementations§
Source§impl Clone for LocalBusiness
impl Clone for LocalBusiness
Source§fn clone(&self) -> LocalBusiness
fn clone(&self) -> LocalBusiness
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 LocalBusiness
impl Debug for LocalBusiness
Source§impl PartialEq for LocalBusiness
impl PartialEq for LocalBusiness
Source§fn eq(&self, other: &LocalBusiness) -> bool
fn eq(&self, other: &LocalBusiness) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for LocalBusiness
impl StructuralPartialEq for LocalBusiness
Auto Trait Implementations§
impl Freeze for LocalBusiness
impl RefUnwindSafe for LocalBusiness
impl Send for LocalBusiness
impl Sync for LocalBusiness
impl Unpin for LocalBusiness
impl UnsafeUnpin for LocalBusiness
impl UnwindSafe for LocalBusiness
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