pub struct SegmentFooter {
pub schema_hash: u64,
pub column_count: u32,
pub row_count: u64,
pub profile_tag: u8,
pub columns: Vec<ColumnMeta>,
}Expand description
Segment footer: contains all metadata needed to read any column.
Serialized as MessagePack at the end of the segment, followed by a 4-byte footer length (u32 LE) and a 4-byte CRC32C of the serialized footer bytes.
[...column blocks...][footer_msgpack][footer_len: u32 LE][footer_crc: u32 LE]To read: seek to end - 8, read footer_len + footer_crc, seek to end - 8 - footer_len, read + verify CRC, deserialize footer.
Fields§
§schema_hash: u64xxHash64 of the schema definition (for schema compatibility checks).
column_count: u32Number of columns in this segment.
row_count: u64Total number of rows across all blocks.
profile_tag: u8Profile that wrote this segment (0 = plain, 1 = timeseries, 2 = spatial).
columns: Vec<ColumnMeta>Per-column metadata (offsets, codecs, block stats).
Implementations§
Sourcepub fn to_bytes(&self) -> Result<Vec<u8>, ColumnarError>
pub fn to_bytes(&self) -> Result<Vec<u8>, ColumnarError>
Serialize the footer to bytes with trailing length + CRC32C.
Sourcepub fn from_segment_tail(data: &[u8]) -> Result<Self, ColumnarError>
pub fn from_segment_tail(data: &[u8]) -> Result<Self, ColumnarError>
Parse a footer from the tail of a segment byte slice.
Reads footer_len and CRC from the last 8 bytes, then deserializes the footer and validates the CRC.
Trait Implementations§
Source§fn clone(&self) -> SegmentFooter
fn clone(&self) -> SegmentFooter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.