pub struct Lexical16(/* private fields */);Expand description
Hex encoding that can be lexically sorted.
use geotime::{Geotime, Lexical16};
let dt: Lexical16 = Geotime::from(0).into();
assert_eq!(dt.to_string(), "80000000000000000000000000000000");For offsets in milliseconds from 1970:
| Offset | Serialization |
|---|---|
| -10e21 | 7fffffffffffffc9ca36523a21600000 |
| -100 | 7fffffffffffffffffffffffffffff9c |
| -1 | 7fffffffffffffffffffffffffffffff |
| 0 | 80000000000000000000000000000000 |
| 1 | 80000000000000000000000000000001 |
| 100 | 80000000000000000000000000000064 |
| 10e21 | 800000000000003635c9adc5dea00000 |
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Lexical16
impl<'de> Deserialize<'de> for Lexical16
Source§fn deserialize<D>(deserializer: D) -> Result<Lexical16, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Lexical16, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Lexical16
impl StructuralPartialEq for Lexical16
Auto Trait Implementations§
impl Freeze for Lexical16
impl RefUnwindSafe for Lexical16
impl Send for Lexical16
impl Sync for Lexical16
impl Unpin for Lexical16
impl UnsafeUnpin for Lexical16
impl UnwindSafe for Lexical16
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