pub struct Point {
pub timestamp: i64,
}Expand description
Point in Time
This is simply a timestamp according to UNIX convention, that is, the number of seconds since 1970-01-01 00:00:00. Negative values represent time before that epoch, obviously.
Because it is an i64, the date range that can be represented is very large, roughly from the year -292_277_022_657 to +292_277_024_626.
However, working with Points close to end of this range is a bad idea, as (internal) date math operations will be likely to overflow.
For instance, Calendar::lookup will overflow for Points with a timestamp close to i64::MAX because it first adds the 1970 years of the UNIX epoch back to the value.
Fields
timestamp: i64Count of seconds since 1970-01-01 00:00:00
Implementations
Trait Implementations
sourceimpl FromSql for Point
impl FromSql for Point
sourcefn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
Converts SQLite value into Rust value.
sourceimpl Ord for Point
impl Ord for Point
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Point> for Point
impl PartialOrd<Point> for Point
sourcefn partial_cmp(&self, other: &Point) -> Option<Ordering>
fn partial_cmp(&self, other: &Point) -> Option<Ordering>
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 moresourceimpl RangeBounds<Point> for Frame
impl RangeBounds<Point> for Frame
sourcefn start_bound(&self) -> Bound<&Point>
fn start_bound(&self) -> Bound<&Point>
Start index bound. Read more
sourcefn contains<U>(&self, item: &U) -> boolwhere
Point: PartialOrd<U>,
U: ?Sized + PartialOrd<Point>,
fn contains<U>(&self, item: &U) -> boolwhere
Point: PartialOrd<U>,
U: ?Sized + PartialOrd<Point>,
sourceimpl ToSql for Point
impl ToSql for Point
sourcefn to_sql(&self) -> SqlResult<ToSqlOutput<'_>>
fn to_sql(&self) -> SqlResult<ToSqlOutput<'_>>
Converts Rust value to SQLite value
impl Copy for Point
impl Eq for Point
impl StructuralEq for Point
impl StructuralPartialEq for Point
Auto Trait Implementations
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnwindSafe for Point
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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