pub struct OpeningHoursSpecification { /* private fields */ }Expand description
Opening-hours specification primitive.
Implementations§
Source§impl OpeningHoursSpecification
impl OpeningHoursSpecification
Sourcepub fn new(
day_of_week: impl AsRef<str>,
opens: impl AsRef<str>,
closes: impl AsRef<str>,
) -> Result<Self, SchemaValueError>
pub fn new( day_of_week: impl AsRef<str>, opens: impl AsRef<str>, closes: impl AsRef<str>, ) -> Result<Self, SchemaValueError>
Creates an opening-hours specification.
§Errors
Returns SchemaValueError::Empty when any component is empty.
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 OpeningHoursSpecification
impl Clone for OpeningHoursSpecification
Source§fn clone(&self) -> OpeningHoursSpecification
fn clone(&self) -> OpeningHoursSpecification
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 OpeningHoursSpecification
impl Debug for OpeningHoursSpecification
Source§impl PartialEq for OpeningHoursSpecification
impl PartialEq for OpeningHoursSpecification
Source§fn eq(&self, other: &OpeningHoursSpecification) -> bool
fn eq(&self, other: &OpeningHoursSpecification) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for OpeningHoursSpecification
impl StructuralPartialEq for OpeningHoursSpecification
Auto Trait Implementations§
impl Freeze for OpeningHoursSpecification
impl RefUnwindSafe for OpeningHoursSpecification
impl Send for OpeningHoursSpecification
impl Sync for OpeningHoursSpecification
impl Unpin for OpeningHoursSpecification
impl UnsafeUnpin for OpeningHoursSpecification
impl UnwindSafe for OpeningHoursSpecification
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