Enum gluesql_core::data::Interval
source · pub enum Interval {
Month(i32),
Microsecond(i64),
}Variants§
Implementations§
source§impl Interval
impl Interval
pub fn unary_minus(&self) -> Self
pub fn add(&self, other: &Interval) -> Result<Self>
pub fn subtract(&self, other: &Interval) -> Result<Self>
pub fn add_date(&self, date: &NaiveDate) -> Result<NaiveDateTime>
pub fn subtract_from_date(&self, date: &NaiveDate) -> Result<NaiveDateTime>
pub fn add_timestamp(&self, timestamp: &NaiveDateTime) -> Result<NaiveDateTime>
pub fn subtract_from_timestamp( &self, timestamp: &NaiveDateTime, ) -> Result<NaiveDateTime>
pub fn add_time(&self, time: &NaiveTime) -> Result<NaiveTime>
pub fn subtract_from_time(&self, time: &NaiveTime) -> Result<NaiveTime>
pub fn years(years: i32) -> Self
pub fn months(months: i32) -> Self
pub fn extract(&self, field: &DateTimeField) -> Result<Value>
pub fn days(days: i32) -> Self
pub fn hours(hours: i32) -> Self
pub fn minutes(minutes: i32) -> Self
pub fn seconds(seconds: i64) -> Self
pub fn milliseconds(milliseconds: i64) -> Self
pub fn microseconds(microseconds: i64) -> Self
pub fn try_from_str( value: &str, leading_field: Option<DateTimeField>, last_field: Option<DateTimeField>, ) -> Result<Self>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Interval
impl<'de> Deserialize<'de> for Interval
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
source§impl Ord for Interval
impl Ord for Interval
source§impl PartialOrd for Interval
impl PartialOrd for Interval
impl Copy for Interval
impl Eq for Interval
impl StructuralPartialEq for Interval
Auto Trait Implementations§
impl Freeze for Interval
impl RefUnwindSafe for Interval
impl Send for Interval
impl Sync for Interval
impl Unpin for Interval
impl UnwindSafe for Interval
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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.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