pub struct TimestampMicros(_);
Expand description

A i64 timestamp expressed as microseconds since the UNIX epoch (UTC).

The number can’t be negative (i.e. can’t be before 1970-01-01 00:00:00).

Examples

use questdb::ingress::TimestampMicros;
 
let ts = TimestampMicros::new(1659548204354448)?;

or

use questdb::ingress::TimestampMicros;
use std::convert::TryInto;
 
let ts: TimestampMicros = std::time::SystemTime::now().try_into()?;

Implementations§

Create a new timestamp from the given number of microseconds since the UNIX epoch (UTC).

Get the numeric value of the timestamp.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.