pub enum DayOfWeek {
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday,
Sunday,
}Available on crate feature
v2_3_0 only.Expand description
A day of the week, as used in TariffRestrictions::day_of_week.
Spec: 2.3.0 §mod_tariffs_dayofweek_enum
Variants§
Monday
Monday.
Wire value: MONDAY
Tuesday
Tuesday.
Wire value: TUESDAY
Wednesday
Wednesday.
Wire value: WEDNESDAY
Thursday
Thursday.
Wire value: THURSDAY
Friday
Friday.
Wire value: FRIDAY
Saturday
Saturday.
Wire value: SATURDAY
Sunday
Sunday.
Wire value: SUNDAY
Implementations§
Source§impl DayOfWeek
impl DayOfWeek
Sourcepub const ALL_WIRE: &'static [&'static str]
pub const ALL_WIRE: &'static [&'static str]
Every wire value this enum accepts, in declaration order.
Sourcepub fn from_str_ignore_case(s: &str) -> Option<Self>
pub fn from_str_ignore_case(s: &str) -> Option<Self>
Parses a wire value, ignoring ASCII case.
OCPI enum values are case-sensitive, so this is only for peers known to get the
case wrong; FromStr is the strict version.
Source§impl DayOfWeek
impl DayOfWeek
Sourcepub const fn iso_number(self) -> u8
pub const fn iso_number(self) -> u8
The ISO weekday number, Monday = 1 through Sunday = 7.
This is the same numbering RegularHours.weekday uses.
Sourcepub const fn from_iso_number(n: u8) -> Option<Self>
pub const fn from_iso_number(n: u8) -> Option<Self>
The day for an ISO weekday number, Monday = 1 through Sunday = 7.
Trait Implementations§
impl Copy for DayOfWeek
Source§impl<'de> Deserialize<'de> for DayOfWeek
impl<'de> Deserialize<'de> for DayOfWeek
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DayOfWeek
Source§impl JsonSchema for DayOfWeek
impl JsonSchema for DayOfWeek
Source§fn json_schema(_g: &mut SchemaGenerator) -> Schema
fn json_schema(_g: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ord for DayOfWeek
impl Ord for DayOfWeek
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for DayOfWeek
impl PartialOrd for DayOfWeek
impl StructuralPartialEq for DayOfWeek
Auto Trait Implementations§
impl Freeze for DayOfWeek
impl RefUnwindSafe for DayOfWeek
impl Send for DayOfWeek
impl Sync for DayOfWeek
impl Unpin for DayOfWeek
impl UnsafeUnpin for DayOfWeek
impl UnwindSafe for DayOfWeek
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.