pub struct CompressedBlock {
pub data: Vec<u8>,
pub first_timestamp: i64,
pub last_timestamp: i64,
pub count: usize,
pub checksum: u32,
}Expand description
A compressed block of time series data.
Fields§
§data: Vec<u8>§first_timestamp: i64§last_timestamp: i64§count: usize§checksum: u32Implementations§
Source§impl CompressedBlock
impl CompressedBlock
Sourcepub fn compression_ratio(&self) -> f64
pub fn compression_ratio(&self) -> f64
Get compression ratio.
Sourcepub fn verify_checksum(&self) -> bool
pub fn verify_checksum(&self) -> bool
Verify block integrity using CRC32 checksum.
Trait Implementations§
Source§impl Clone for CompressedBlock
impl Clone for CompressedBlock
Source§fn clone(&self) -> CompressedBlock
fn clone(&self) -> CompressedBlock
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 CompressedBlock
impl Debug for CompressedBlock
Source§impl From<&CompressedBlock> for PersistedBlock
impl From<&CompressedBlock> for PersistedBlock
Source§fn from(block: &CompressedBlock) -> Self
fn from(block: &CompressedBlock) -> Self
Converts to this type from the input type.
Source§impl From<PersistedBlock> for CompressedBlock
impl From<PersistedBlock> for CompressedBlock
Source§fn from(pb: PersistedBlock) -> Self
fn from(pb: PersistedBlock) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CompressedBlock
impl RefUnwindSafe for CompressedBlock
impl Send for CompressedBlock
impl Sync for CompressedBlock
impl Unpin for CompressedBlock
impl UnsafeUnpin for CompressedBlock
impl UnwindSafe for CompressedBlock
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