Struct OpeningHoursSpecification
pub struct OpeningHoursSpecification { /* private fields */ }Expand description
Opening-hours specification primitive.
Implementations§
§impl OpeningHoursSpecification
impl OpeningHoursSpecification
pub fn new(
day_of_week: impl AsRef<str>,
opens: impl AsRef<str>,
closes: impl AsRef<str>,
) -> Result<OpeningHoursSpecification, SchemaValueError>
pub fn new( day_of_week: impl AsRef<str>, opens: impl AsRef<str>, closes: impl AsRef<str>, ) -> Result<OpeningHoursSpecification, SchemaValueError>
Creates an opening-hours specification.
§Errors
Returns [SchemaValueError::Empty] when any component is empty.
pub const fn schema_type(&self) -> &'static str
pub const fn schema_type(&self) -> &'static str
Returns the schema-like type label.
Trait Implementations§
§impl Clone for OpeningHoursSpecification
impl Clone for OpeningHoursSpecification
§fn clone(&self) -> OpeningHoursSpecification
fn clone(&self) -> OpeningHoursSpecification
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 OpeningHoursSpecification
impl Debug for OpeningHoursSpecification
§impl PartialEq for OpeningHoursSpecification
impl PartialEq for OpeningHoursSpecification
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