Enum gluesql_core::data::Interval
source · [−]Variants
Month(i32)
Microsecond(i64)
Implementations
sourceimpl 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_literal(
value: &str,
leading_field: Option<&DateTimeField>,
last_field: Option<&DateTimeField>
) -> Result<Self>
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Interval
impl<'de> Deserialize<'de> for Interval
sourcefn 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
sourceimpl PartialEq<Interval> for Interval
impl PartialEq<Interval> for Interval
sourceimpl PartialOrd<Interval> for Interval
impl PartialOrd<Interval> for Interval
sourcefn partial_cmp(&self, other: &Interval) -> Option<Ordering>
fn partial_cmp(&self, other: &Interval) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Copy for Interval
impl Eq for Interval
impl StructuralEq for Interval
impl StructuralPartialEq for Interval
Auto Trait Implementations
impl RefUnwindSafe for Interval
impl Send for Interval
impl Sync for Interval
impl Unpin for Interval
impl UnwindSafe for Interval
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.