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:
| Offset | Serialization |
|---|---|
| -10e21 | gzzzzzzzzzzwmkjqb8x22s0000 |
| -100 | gzzzzzzzzzzzzzzzzzzzzzzzmh |
| -1 | gzzzzzzzzzzzzzzzzzzzzzzzzw |
| 0 | h0000000000000000000000000 |
| 1 | h0000000000000000000000004 |
| 100 | h00000000000000000000000dh |
| 10e21 | h00000000003def9pr2xx80000 |
Trait Implementations§
source§impl Clone for LexicalGeohash
impl Clone for LexicalGeohash
source§fn clone(&self) -> LexicalGeohash
fn clone(&self) -> LexicalGeohash
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for LexicalGeohash
impl Debug for LexicalGeohash
source§impl<'de> Deserialize<'de> for LexicalGeohash
impl<'de> Deserialize<'de> for LexicalGeohash
source§fn deserialize<D>(deserializer: D) -> Result<LexicalGeohash, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<LexicalGeohash, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for LexicalGeohash
impl Display for LexicalGeohash
source§impl From<Geotime> for LexicalGeohash
impl From<Geotime> for LexicalGeohash
source§impl From<LexicalGeohash> for Geotime
impl From<LexicalGeohash> for Geotime
source§fn from(ts: LexicalGeohash) -> Self
fn from(ts: LexicalGeohash) -> Self
Converts to this type from the input type.
source§impl PartialEq<LexicalGeohash> for LexicalGeohash
impl PartialEq<LexicalGeohash> for LexicalGeohash
source§fn eq(&self, other: &LexicalGeohash) -> bool
fn eq(&self, other: &LexicalGeohash) -> bool
This method tests for
self and other values to be equal, and is used
by ==.