pub struct HGrid {
pub meta: HDict,
pub cols: Vec<HCol>,
pub rows: Vec<HDict>,
}Expand description
Haystack Grid — the fundamental tabular data structure.
A grid has:
meta: grid-level metadata (anHDict)cols: ordered list of columns (HCol)rows: ordered list of row dicts (HDict)
Fields§
§meta: HDict§cols: Vec<HCol>§rows: Vec<HDict>Implementations§
Source§impl HGrid
impl HGrid
Sourcepub fn from_parts(meta: HDict, cols: Vec<HCol>, rows: Vec<HDict>) -> Self
pub fn from_parts(meta: HDict, cols: Vec<HCol>, rows: Vec<HDict>) -> Self
Create a grid from its constituent parts.
Sourcepub fn col(&self, name: &str) -> Option<&HCol>
pub fn col(&self, name: &str) -> Option<&HCol>
Look up a column by name. Returns None if not found.
Sourcepub fn is_err(&self) -> bool
pub fn is_err(&self) -> bool
Returns true if this grid represents an error response.
An error grid has an err marker tag in its metadata.
Trait Implementations§
impl StructuralPartialEq for HGrid
Auto Trait Implementations§
impl Freeze for HGrid
impl RefUnwindSafe for HGrid
impl Send for HGrid
impl Sync for HGrid
impl Unpin for HGrid
impl UnsafeUnpin for HGrid
impl UnwindSafe for HGrid
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