Enum madsim_tokio_postgres::types::Date  
source · [−]pub enum Date<T> {
    PosInfinity,
    NegInfinity,
    Value(T),
}Expand description
A wrapper that can be used to represent infinity with Type::Date types.
Variants
PosInfinity
Represents infinity, a date that is later than all other dates.
NegInfinity
Represents -infinity, a date that is earlier than all other dates.
Value(T)
The wrapped date.
Trait Implementations
sourceimpl<'a, T> FromSql<'a> for Date<T> where
    T: FromSql<'a>, 
 
impl<'a, T> FromSql<'a> for Date<T> where
    T: FromSql<'a>, 
sourcefn from_sql(
    ty: &Type,
    raw: &'a [u8]
) -> Result<Date<T>, Box<dyn Error + Send + Sync + 'static, Global>>
 
fn from_sql(
    ty: &Type,
    raw: &'a [u8]
) -> Result<Date<T>, Box<dyn Error + Send + Sync + 'static, Global>>
Creates a new value of this type from a buffer of data of the specified
Postgres Type in its binary format. Read more
sourcefn accepts(ty: &Type) -> bool
 
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be created from the specified
Postgres Type. Read more
sourceimpl<T> ToSql for Date<T> where
    T: ToSql, 
 
impl<T> ToSql for Date<T> where
    T: ToSql, 
sourcefn to_sql(
    &self,
    ty: &Type,
    out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Send + Sync + 'static, Global>>
 
fn to_sql(
    &self,
    ty: &Type,
    out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Send + Sync + 'static, Global>>
Converts the value of self into the binary format of the specified
Postgres Type, appending it to out. Read more
impl<T> Copy for Date<T> where
    T: Copy, 
impl<T> StructuralPartialEq for Date<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Date<T> where
    T: RefUnwindSafe, 
impl<T> Send for Date<T> where
    T: Send, 
impl<T> Sync for Date<T> where
    T: Sync, 
impl<T> Unpin for Date<T> where
    T: Unpin, 
impl<T> UnwindSafe for Date<T> where
    T: UnwindSafe, 
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<T> BorrowToSql for T where
    T: ToSql, 
 
impl<T> BorrowToSql for T where
    T: ToSql, 
sourcefn borrow_to_sql(&self) -> &dyn ToSql
 
fn borrow_to_sql(&self) -> &dyn ToSql
Returns a reference to self as a ToSql trait object.
sourceimpl<T> Instrument for T
 
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
 
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
    S: Into<Dispatch>, 
 
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
    S: Into<Dispatch>, 
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
 
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more