use crate::wire::StreamMeta;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum RegionKind {
Meta,
DataBlob,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum DecodeHint {
Presence,
Bool,
I32,
U32,
I64,
U64,
F32,
F64,
Bytes,
}
#[derive(Debug, Clone)]
pub struct BitField {
pub hi: u8,
pub lo: u8,
pub raw: u64,
pub meaning: String,
}
#[derive(Debug, Clone, Copy)]
pub struct BlobInfo {
pub meta: StreamMeta,
pub hint: DecodeHint,
}
#[derive(Debug, Clone)]
pub struct Region {
pub offset: usize,
pub len: usize,
pub depth: usize,
pub label: String,
pub value: Option<String>,
pub bits: Vec<BitField>,
pub kind: RegionKind,
pub container: bool,
pub blob: Option<BlobInfo>,
}
pub struct DumpTree {
pub buf_len: usize,
pub regions: Vec<Region>,
}