Struct geotime::LexicalGeohash

source ·
pub struct LexicalGeohash(_);
Expand description

Geohash-like format that can be lexically sorted.

use geotime::{Geotime, LexicalGeohash};

let dt: LexicalGeohash = Geotime::from(0).into();
assert_eq!(dt.to_string(), "h0000000000000000000000000");

For offsets in milliseconds from 1970:

OffsetSerialization
-10e21gzzzzzzzzzzwmkjqb8x22s0000
-100gzzzzzzzzzzzzzzzzzzzzzzzmh
-1gzzzzzzzzzzzzzzzzzzzzzzzzw
0h0000000000000000000000000
1h0000000000000000000000004
100h00000000000000000000000dh
10e21h00000000003def9pr2xx80000

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
Deserialize this value from the given Serde deserializer. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Serialize this value into the given Serde serializer. Read more

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
Marks self as using is_human_readable == true
Marks self as using is_human_readable == false

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
Converts the given value to a String. 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.