#[repr(u16)]pub enum IntervalFields {
Show 14 variants
All = 32_767,
Year = 4,
Month = 2,
Day = 8,
Hour = 1_024,
Minute = 2_048,
Second = 4_096,
YearToMonth = 6,
DayToHour = 1_032,
DayToMinute = 3_080,
DayToSecond = 7_176,
HourToMinute = 3_072,
HourToSecond = 7_168,
MinuteToSecond = 6_144,
}Expand description
The stored-field restriction in a PostgreSQL interval declaration.
Variants§
All = 32_767
Year = 4
Month = 2
Day = 8
Hour = 1_024
Minute = 2_048
Second = 4_096
YearToMonth = 6
DayToHour = 1_032
DayToMinute = 3_080
DayToSecond = 7_176
HourToMinute = 3_072
HourToSecond = 7_168
MinuteToSecond = 6_144
Implementations§
Source§impl IntervalFields
impl IntervalFields
pub const fn modifier_mask(self) -> u16
pub const fn from_modifier_mask(mask: i64) -> Option<Self>
pub const fn sql_suffix(self) -> &'static str
pub fn from_sql_suffix(suffix: &str) -> Option<Self>
Trait Implementations§
Source§impl Clone for IntervalFields
impl Clone for IntervalFields
Source§fn clone(&self) -> IntervalFields
fn clone(&self) -> IntervalFields
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 moreimpl Copy for IntervalFields
Source§impl Debug for IntervalFields
impl Debug for IntervalFields
Source§impl<'de> Deserialize<'de> for IntervalFields
impl<'de> Deserialize<'de> for IntervalFields
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for IntervalFields
Source§impl PartialEq for IntervalFields
impl PartialEq for IntervalFields
Source§impl Serialize for IntervalFields
impl Serialize for IntervalFields
impl StructuralPartialEq for IntervalFields
Auto Trait Implementations§
impl Freeze for IntervalFields
impl RefUnwindSafe for IntervalFields
impl Send for IntervalFields
impl Sync for IntervalFields
impl Unpin for IntervalFields
impl UnsafeUnpin for IntervalFields
impl UnwindSafe for IntervalFields
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more