[−][src]Enum tokio_postgres::types::Date
A wrapper that can be used to represent infinity with Type::Date types.
Variants
PosInfinityRepresents infinity, a date that is later than all other dates.
NegInfinityRepresents -infinity, a date that is earlier than all other dates.
Value(T)The wrapped date.
Trait Implementations
impl<'a, T: FromSql<'a>> FromSql<'a> for Date<T>[src]
fn from_sql(
ty: &Type,
raw: &'a [u8]
) -> Result<Self, Box<dyn Error + Sync + Send>>[src]
ty: &Type,
raw: &'a [u8]
) -> Result<Self, Box<dyn Error + Sync + Send>>
fn accepts(ty: &Type) -> bool[src]
fn from_sql_null(ty: &Type) -> Result<Self, Box<dyn Error + Sync + Send>>[src]
Creates a new value of this type from a NULL SQL value. Read more
fn from_sql_nullable(
ty: &Type,
raw: Option<&'a [u8]>
) -> Result<Self, Box<dyn Error + Sync + Send>>[src]
ty: &Type,
raw: Option<&'a [u8]>
) -> Result<Self, Box<dyn Error + Sync + Send>>
A convenience function that delegates to from_sql and from_sql_null depending on the value of raw. Read more
impl<T: ToSql> ToSql for Date<T>[src]
fn to_sql(
&self,
ty: &Type,
out: &mut Vec<u8>
) -> Result<IsNull, Box<dyn Error + Sync + Send>>[src]
&self,
ty: &Type,
out: &mut Vec<u8>
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn accepts(ty: &Type) -> bool[src]
fn to_sql_checked(
&self,
ty: &Type,
out: &mut Vec<u8>
) -> Result<IsNull, Box<dyn Error + Sync + Send>>[src]
&self,
ty: &Type,
out: &mut Vec<u8>
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
impl<T: Copy> Copy for Date<T>[src]
impl<T: PartialEq> PartialEq<Date<T>> for Date<T>[src]
impl<T: Clone> Clone for Date<T>[src]
fn clone(&self) -> Date<T>[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<T: Debug> Debug for Date<T>[src]
Auto Trait Implementations
Blanket Implementations
impl<T> FromSqlOwned for T where
T: FromSql<'a>, [src]
T: FromSql<'a>,
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Same for T
type Output = T
Should always be Self