pub struct DeltaOfDeltaDecoder;Expand description
Decodes delta-of-delta encoded timestamps.
Implementations§
Source§impl DeltaOfDeltaDecoder
impl DeltaOfDeltaDecoder
Sourcepub fn decode(data: &[u8]) -> Result<Vec<i64>>
pub fn decode(data: &[u8]) -> Result<Vec<i64>>
Decode a delta-of-delta encoded byte buffer back to timestamps.
§Overflow safety
Reconstruction uses wrapping arithmetic (wrapping_add) to
mirror the wrapping_sub used during encoding. This guarantees
correct round-trip for any i64 sequence and provides robustness
against corrupt data — the decoder never panics on arithmetic.
§Errors
Returns EncodingError::CorruptData if the data is malformed.
Trait Implementations§
Source§impl Clone for DeltaOfDeltaDecoder
impl Clone for DeltaOfDeltaDecoder
Source§fn clone(&self) -> DeltaOfDeltaDecoder
fn clone(&self) -> DeltaOfDeltaDecoder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DeltaOfDeltaDecoder
Auto Trait Implementations§
impl Freeze for DeltaOfDeltaDecoder
impl RefUnwindSafe for DeltaOfDeltaDecoder
impl Send for DeltaOfDeltaDecoder
impl Sync for DeltaOfDeltaDecoder
impl Unpin for DeltaOfDeltaDecoder
impl UnsafeUnpin for DeltaOfDeltaDecoder
impl UnwindSafe for DeltaOfDeltaDecoder
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