pub struct AbsoluteEncoding;Expand description
Absolute timestamp encoding using big-endian u64.
Characteristics:
- Fixed 8-byte encoding
- Lexicographically sortable
- Fast encoding/decoding (essentially a memcpy)
- Supports random access (direct seeking to any timestamp)
Best for:
- Sparse, irregular time series
- Workloads requiring random access
- When simplicity and speed matter more than storage space
Trait Implementations§
Source§impl Clone for AbsoluteEncoding
impl Clone for AbsoluteEncoding
Source§fn clone(&self) -> AbsoluteEncoding
fn clone(&self) -> AbsoluteEncoding
Returns a duplicate 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 AbsoluteEncoding
impl Debug for AbsoluteEncoding
Source§impl TimestampEncoding for AbsoluteEncoding
impl TimestampEncoding for AbsoluteEncoding
Source§fn encode(timestamp: u64) -> Vec<u8> ⓘ
fn encode(timestamp: u64) -> Vec<u8> ⓘ
Encodes a timestamp (milliseconds since epoch) into a sortable byte representation.
Source§fn decode(bytes: &[u8]) -> Result<u64, EncodingError>
fn decode(bytes: &[u8]) -> Result<u64, EncodingError>
Decodes a timestamp from its byte representation.
Source§fn supports_random_access() -> bool
fn supports_random_access() -> bool
Returns true if this encoding supports direct seeking to arbitrary timestamps.
impl Copy for AbsoluteEncoding
Auto Trait Implementations§
impl Freeze for AbsoluteEncoding
impl RefUnwindSafe for AbsoluteEncoding
impl Send for AbsoluteEncoding
impl Sync for AbsoluteEncoding
impl Unpin for AbsoluteEncoding
impl UnwindSafe for AbsoluteEncoding
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