Enum HGrid

Source
pub enum HGrid<'a, T: NumTrait + 'a> {
    Grid {
        meta: HashMap<String, HBox<'a, T>>,
        col_index: HashMap<String, usize>,
        cols: Vec<HCol<'a, T>>,
        rows: Vec<HRow<'a, T>>,
    },
    Error {
        dis: String,
        errTrace: Option<String>,
    },
    Empty {
        meta: Option<HashMap<String, HBox<'a, T>>>,
    },
}

Variants§

§

Grid

Fields

§meta: HashMap<String, HBox<'a, T>>
§col_index: HashMap<String, usize>
§cols: Vec<HCol<'a, T>>
§rows: Vec<HRow<'a, T>>
§

Error

Fields

§errTrace: Option<String>
§

Empty

Fields

§meta: Option<HashMap<String, HBox<'a, T>>>

Implementations§

Source§

impl<'a, T: NumTrait + 'a> HGrid<'a, T>

Source

pub fn new( g_columns: Option<Vec<HCol<'a, T>>>, grid_rows: Vec<HashMap<String, HBox<'a, T>>>, ) -> HGrid<'a, T>

Source

pub fn from_row_vec<'b>( columns: Vec<(String, Option<HashMap<String, HBox<'b, T>>>)>, grid_rows: Vec<Vec<Option<HBox<'b, T>>>>, ) -> HGrid<'b, T>

Source

pub fn add_meta( self, meta: HashMap<String, HBox<'a, T>>, ) -> Result<HGrid<'a, T>, HGridErr>

Source

pub fn add_col_meta( self, col: &str, meta: HashMap<String, HBox<'a, T>>, ) -> Result<Self, HGridErr>

Source

pub fn get(&'a self, key: usize) -> Result<&'a HRow<'a, T>, HGridErr>

Source

pub fn first(&'a self) -> Result<&'a HRow<'a, T>, HGridErr>

Source

pub fn last(&'a self) -> Result<&'a HRow<'a, T>, HGridErr>

Source

pub fn has(&self, key: &str) -> bool

Source

pub fn meta(&'a self) -> &'a HashMap<String, HBox<'a, T>>

Source

pub fn iter_cols(&'a self) -> Iter<'a, HCol<'a, T>>

Source

pub fn iter(&'a self) -> Iter<'a, HRow<'a, T>>

Source

pub fn as_ref(&self) -> &Self

Trait Implementations§

Source§

impl<'a, T: NumTrait + 'a> Debug for HGrid<'a, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, T: 'a + NumTrait> HVal<'a, T> for HGrid<'a, T>

Source§

fn to_zinc(&self, buf: &mut String) -> Result

Source§

fn to_json(&self, _buf: &mut String) -> Result

Source§

fn haystack_type(&self) -> HType

Source§

fn _eq(&self, other: &dyn HVal<'a, T>) -> bool

Source§

fn get_grid_val(&self) -> Option<&HGrid<'a, T>>

Source§

fn get_null_val(&self) -> Option<&HNull>

Source§

fn get_marker_val(&self) -> Option<&HMarker>

Source§

fn get_remove_val(&self) -> Option<&HRemove>

Source§

fn get_na_val(&self) -> Option<&HNA>

Source§

fn get_bool_val(&self) -> Option<&HBool>

Source§

fn get_string_val(&self) -> Option<&HStr>

Source§

fn get_uri_val(&self) -> Option<&HUri>

Source§

fn get_coord_val(&self) -> Option<&HCoord<T>>

Source§

fn get_datetime_val(&self) -> Option<&HDateTime>

Source§

fn get_date_val(&self) -> Option<&HDate>

Source§

fn get_time_val(&self) -> Option<&HTime>

Source§

fn get_number_val(&self) -> Option<&HNumber<T>>

Source§

fn get_ref_val(&self) -> Option<&HRef>

Source§

fn get_dict_val(&'a self) -> Option<&'a HDict<'a, T>>

Source§

fn get_list_val(&'a self) -> Option<&'a HList<'a, T>>

Auto Trait Implementations§

§

impl<'a, T> Freeze for HGrid<'a, T>

§

impl<'a, T> !RefUnwindSafe for HGrid<'a, T>

§

impl<'a, T> !Send for HGrid<'a, T>

§

impl<'a, T> !Sync for HGrid<'a, T>

§

impl<'a, T> Unpin for HGrid<'a, T>

§

impl<'a, T> !UnwindSafe for HGrid<'a, T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,