pub struct HlxHeader {
pub fields: Vec<HlxField>,
pub metadata: HashMap<String, Value>,
pub flags: u8,
pub row_count: u64,
pub preview_rows: Option<Vec<Value>>,
}Expand description
Helix Data File (.helix) Header Structure This is for binary DATA output files, not configuration files. For configuration files, see hlx_config_format.rs (.hlx) and hlxb_config_format.rs (.hlxb)
Fields§
§fields: Vec<HlxField>Schema fields (simplified representation)
metadata: HashMap<String, Value>Optional metadata about the run
flags: u8Compression flags
row_count: u64Number of rows in this file
preview_rows: Option<Vec<Value>>Optional preview rows (first N rows as JSONL)
Implementations§
Source§impl HlxHeader
impl HlxHeader
pub fn new(schema: &Schema, metadata: HashMap<String, Value>) -> Self
Sourcepub fn with_compression(self, compressed: bool) -> Self
pub fn with_compression(self, compressed: bool) -> Self
Set compression flag
Sourcepub fn with_row_count(self, count: u64) -> Self
pub fn with_row_count(self, count: u64) -> Self
Set row count
Sourcepub fn with_preview(self, preview: Vec<Value>) -> Self
pub fn with_preview(self, preview: Vec<Value>) -> Self
Set preview rows (first N rows as JSON)
Sourcepub fn is_compressed(&self) -> bool
pub fn is_compressed(&self) -> bool
Check if compression is enabled
Sourcepub fn from_json_bytes(bytes: &[u8]) -> Result<Self, HlxError>
pub fn from_json_bytes(bytes: &[u8]) -> Result<Self, HlxError>
Deserialize header from JSON bytes
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HlxHeader
impl<'de> Deserialize<'de> for HlxHeader
Source§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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HlxHeader
impl RefUnwindSafe for HlxHeader
impl Send for HlxHeader
impl Sync for HlxHeader
impl Unpin for HlxHeader
impl UnwindSafe for HlxHeader
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more