pub enum DateTruncError {
UnitNotRecognized,
UnitNotSupported,
}Expand description
Why PostgreSQL refuses the unit of a date_trunc, one variant per message it raises, which
quotes the lowercased unit and names the input type, as in unit "epoch" not recognized for type timestamp without time zone.
Variants§
UnitNotRecognized
Text that names no unit, epoch and dow among them.
UnitNotSupported
A unit date_trunc does not truncate the type to, timezone for every type and
DateTruncField::Week for an interval.
Trait Implementations§
Source§impl Clone for DateTruncError
impl Clone for DateTruncError
impl Copy for DateTruncError
Source§impl Debug for DateTruncError
impl Debug for DateTruncError
Source§impl Display for DateTruncError
impl Display for DateTruncError
impl Eq for DateTruncError
Source§impl Error for DateTruncError
impl Error for DateTruncError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl Hash for DateTruncError
impl Hash for DateTruncError
Source§impl PartialEq for DateTruncError
impl PartialEq for DateTruncError
impl StructuralPartialEq for DateTruncError
Auto Trait Implementations§
impl Forget for DateTruncError
impl Freeze for DateTruncError
impl Move for DateTruncError
impl RefUnwindSafe for DateTruncError
impl Send for DateTruncError
impl Sync for DateTruncError
impl Unpin for DateTruncError
impl UnsafeUnpin for DateTruncError
impl UnwindSafe for DateTruncError
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